Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Message assigned to a menu choice
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00143377
Message ID:
00143687
Views:
14
>I am programmatically adding/modifying menus to my application and have been wondering why I can set SKIP FOR to a function such as:
>
>SKIP FOR NOT oApp.IsFileEmpty('L:\VF\TEXT.TXT)
>
>but when I try to set the message to:
>
>MESSAGE IIF(oApp.IsFileEmpty("L:\VF\SYSDOWN.TXT"),oApp.GetAppInfo("LOTCARD","TITLE"),FILETOSTR("L:\VF\SYSDOWN.TXT"))
>
>It initiallizes properly but it never changes when conditions change in the environment. The SKIP does change when conditions change in the environment.
>
>Any help would be appreciated
>
>TIA

Bret,

SKIP FOR is dynamic and MESSAGE is static. Message is set when the DEFINE command eecutes and does not change, but skip for, by nature, changes dynamically. To change the message you will need to redefine the bar on the menu.
DEFINE BAR ## OF PopupName ;
       PROMPT "..." ;
       MESSAGE IIF(oApp.IsFileEmpty("L:VF\SYSDOWN.TXT"),;
          oApp.GetAppInfo("LOTCARD","TITLE"),;
          FILETOSTR("L:\VF\SYSDOWN.TXT")) ;
       SKIP FOR NOT oApp.IsFileEmpty('L:\VF\TEXT.TXT)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform