Re: [MacPerl] disable menus

2001-12-20 Thread Greenblatt & Seay
At 5:59 PM -0500 2001/12/19, Axel Rose wrote: >Your menu id checker doesn't give me the needed results though: Sorry, try this... #!perl5 use Mac::Memory; use Mac::Resources; use Mac::MoreFiles; use Mac::Menus; $programPath = $Application{McPL}; &read_resource; exit; sub read_resource {

Re: [MacPerl] disable menus

2001-12-19 Thread Axel Rose
Hello menu controllers, thanks for the hints. I found a solution now to disable the MacPerl menus at runtime. Your menu id checker doesn't give me the needed results though: >use Mac::Menus; > > $~="OUT1"; > for $id (128..66000) { > $menuHandle = GetMenuHandle($id); > if($menuHandle) {

Re: [MacPerl] disable menus

2001-12-19 Thread Greenblatt & Seay
use Mac::Menus; DeleteMenu $id; __END__ If you need to find out the ids of existing menus use... use Mac::Menus; $~="OUT1"; for $id (128..66000) { $menuHandle = GetMenuHandle($id); if($menuHandle) { # $menu = GetMenuBar(); $flags = $menuHandle->enableFlags;

Re: [MacPerl] disable menus

2001-12-19 Thread Thomas Wegner
At 17:01 Uhr +0100 19.12.2001, Axel Rose wrote: >Perhaps somebody knows this - how can I disable a menu completely? > [snip] An item number of 0 disables (DisableItem 0) or enables (EnableItem 0) an entire menu. You must call DrawMenuBar explicitly to make the change visible to the user. This w

Re: [MacPerl] disable menus

2001-12-19 Thread Axel Rose
A perfect solution for the moment I have just found is to disable the menu with ResEdit. Thanks for your time! Axel

Re: [MacPerl] disable menus

2001-12-19 Thread Axel Rose
Um 11:03 Uhr -0500 19.12.2001, schrieb Morbus Iff: >"Completely"? Will the menu *ever* be used Never. It's for standalone applications. The menu is MacPerl's File menu and by disabling it I want to avoid a user quitting. It works ok. with disabling all items. Just for clarity I'd like to let the

Re: [MacPerl] disable menus

2001-12-19 Thread Morbus Iff
>Perhaps somebody knows this - how can I disable a menu completely? "Completely"? Will the menu *ever* be used - if not, you may want to remove it? I have code at home that will remove a menu - you may be able to find the same by searching through the archives. If not, let me know, and I can

[MacPerl] disable menus

2001-12-19 Thread Axel Rose
Perhaps somebody knows this - how can I disable a menu completely? With the following code I disable all entries within the "File" menu but "File" itself remains active. use Mac::Menus; use Mac::Events; my $menu = GetMenu 129; print "disabling ...\n"; DisableItem $menu; pause( 10 ); EnableIt