Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
POP MENU produces fatal exception
Message
De
11/07/2004 08:45:38
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00920012
Message ID:
00923107
Vues:
16
Hi Sergey,

It looks as if you can reuse them. As long as the formclass is open, that is.
* Form.Activate
Try 
   oMainForm.MenuManager.PopFromStack(This.cMenuName)
CATCH
   DO MainMenu.mpr WITH THIS,.F.    && Runs first time only
ENDTRY

* Deactivate
oMainForm.MenuManager.PushToStack(This.cMenuName)
I was hoping for OO menus in the upcoming version, but it doesn't much look like it.

The fatal error did not go away though, it still happens if I issue a
RELEASE MENUS (This.cMenuName) EXTENDED in Form.Unload.

On the other hand it also looks as if the menu (and memory) is released automatically when the form is closed, so I did away with the release command altogether, and see how I fare.

Thanks for your help.

BR

Peter


>Hi Peter,
>
>I don't think you can reuse popped menus besides the current one.
>
>>
>>Put them into an array and then pop 10,9,.. and so on, until I get to the one I want. With a bit of ADEL() and DIMENSION and another array to hold the popped ones and pushing them back on the stack thrown in it should work.
>>
>>I think I can figure this out. It's certainly woth a try.
>>
>>Thank you for pointing me in the right direction.
>>
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform