Information générale
Catégorie:
Gestionnaire de menu & Menus
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement