Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
POP MENU produces fatal exception
Message
From
11/07/2004 08:45:38
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00920012
Message ID:
00923107
Views:
17
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform