Menu Bar in MacOS

Martin Baxter martin at materiaprima.fsnet.co.uk
Mon Apr 19 11:27:44 EDT 2004


>>  >Hi,
>>>
>>>I am trying to figure out the best way of handling the Menu Bar in MacOS.
>>>
>>
>>>Basically what I am asking is how do I share the menu bar with all
>>>the other stacks (windows) in the App like a regular MacOS
>>>application?
>>>
>>>Thanks in Advance for any Advice
>>>Cheers
>>>Dave
>>
>>Hello Dave,
>>
>>Have a look at the defaultmenubar property in the docs.
>>
>>I think that should do what you want
>>
>
>I just tried doing that, I put the following line in the preOpenStack
>handler of the (dummy) main stack script:
>
>set the defaultMenubar to "MainMenuBar"
>
>which caused ALL kinds of problems in the IDE while trying to debug,
>ended up having to edit the Script via the message box, force quit RR
>and then restart machine!
>
>Is this supposed to happen? I am using RunRev 2.2 on MacOS X and Classic.
>

the defaultmenubar is a global property, clearly it affects revolution too
when it's running.

I think I would put the "set the defaultmenubar" script in the "on startup"
handler of the main stack so that it only runs after the stack has been
built into a standalone and opens.

While developing you could arrange for your mainstack to be visible in the
IDE perhaps, and just bring it to the front with a click when you want to
test it. I guess you must be doing something like this already.

>More Info:
>
>I used to have a Menu Bar that was located in a Sub-Stack. I deleted
>the Group from that stack and added a new one to the (dummy) main
>stack. However when I look via the message box, the menubar property
>is still set to the old Menubar Group, and as far as I can tell, the
>old script is still there and being used! However, I cannot see the
>object in the Application Browser! How can I:
>
>1.  Remove it!
>
>2.  Stop this from happening again!
>
>Thanks a lot
>Dave

I just tried deleting a menubar, and the menubar property isn't
automatically cleared when you do that.

So you could just set that property to empty from the message box and see
if that clears your problems. I'm not saying it necessarily will but you
could try it.

HTH

Martin Baxter




More information about the use-livecode mailing list