Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu bar stays after being removed
Message
From
14/01/2022 16:30:57
 
 
To
12/01/2022 10:00:08
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
01683251
Message ID:
01683266
Views:
83
>Got another weird one. I have a couple of forms that have code in Init to add a bar to a particular menu popup and code in Destroy to remove that bar. Some of the time (and I'm not sure exactly when that is and this morning, can't find any such cases), all works as expected. The bar is added when the form opens and goes away when it closes. More often, the bar is added when the form opens and doesn't go away when it closes.
>


So I'm now fairly convinced this is a timing/refresh issue. I added some code to loop through the menu (checking bars 1 to 99) and dump what it finds both before and after the release. When I do that with DEBUGOUTs and the Debugger open, the bar is removed and doesn't reappear. When I do with FileToStr() and the Debugger closed, which is much faster, the bar is still there at the end.

I tried adding a brief WAIT after the RELEASE BAR in case it was timing, and also tried using ACTIVATE MENU after RELEASE to get the menu to refresh itself. Neither did the trick.

So still trying to figure out how to resolve this.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform