Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove menu from app
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00685155
Message ID:
00685176
Views:
16
>>(see Category before responding)
>>
>>I've been playing with this for about 15 minutes and I'm wondering if there is a way to completely remove the menu from a MM's app. temporarily. I've tried goApp.oMenu.Release(), which will remove it, but then things go bad when I try to exit the app. I tried goApp.oMenu.GetObjectCount(), then using goApp.oMenu.Remove() for each of them, but it fails when I try removing the last menu item (possible bug here?). Is there another way I can do this?
>>
>>Thanks,
>
>Oh yeah, same question for Toolbars. I could have sworn it worked when I did: goApp.oToolbars.Remove(1), but now it's not working.

It looks like it's a bug. I modified the code in CBaseForm::Destroy() so that it reads:
	*----------------------------------------------------------
	*-- Remove the form's caption from the Window menu pulldown
	*----------------------------------------------------------
	IF TYPE("goApp.oMenu.oWindowPad.oPopup") == "O" AND !ISNULL(goApp.oMenu.oWindowPad.oPopup)
		goApp.oMenu.oWindowPad.oPopup.Remove(This.Caption, "cCaption")
	ENDIF
(I added the ISNULL check)

Is there a better (read: framework approved) way to do all of this?
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform