>I am trying to enable, disable a menu item without having to exit and re-execute the menu. I have created an appObject oApp.lExistsData which if true allows the menu items to appear, but if false, certain menu items will disappear. I am not sure how to proceed now. I changed the value of the object oApp.lExistsData to TRUE once I had generated data, and thought that this would allow the menu items to now appear, but do you have to re-call the menu or re-execute it?
>
>I hope I am explaining this clearly enough.
>
>Here's the resulting code in the MPR file for the MENU:
>
>
>IF NOT (oApp.lExistsData)
> RELEASE BAR 3 OF Programs
>ENDIF
>
>
>IF NOT (oApp.lExistsData)
> RELEASE BAR 4 OF Programs
>ENDIF
>
>
>IF NOT (oApp.lExistsData)
> RELEASE PAD Admin OF _MSYSMENU
>ENDIF
>
Cecil,
The only way I know to change a menu dynamically is to put the add/release of items in a skip for clause of another menu item
Each time, prior to activating the menu, all the skip for clauses are evaluated. If one of the skip for clause would be
skip for aFunctionOfMine()
function aFunctionOfMine()
return FALSE
endfunc
You could also put the code in lExistsData_assign()
Gregory