Menu Problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Menu Problem
I used the Menu Builder Tool to create a standard set of menus for my app running on a Mac. These menus go in the Mac menu bar, not at the top of each card.
The menus work fine but now every time I start the app, my first card (which is a pallette) grows in height by a small amount. The menus aren't on the card and the growth occurs at the bottom of the card. Just from reading the description of how menus work, it seems like this could be something to do with the insertion and deletion of the menus at the card level.
Is there some setting I need to change to prevent this from happening? I had hoped the Menu Builder would take care of everything but maybe not?
Thanks,
Pete
The menus work fine but now every time I start the app, my first card (which is a pallette) grows in height by a small amount. The menus aren't on the card and the growth occurs at the bottom of the card. Just from reading the description of how menus work, it seems like this could be something to do with the insertion and deletion of the menus at the card level.
Is there some setting I need to change to prevent this from happening? I had hoped the Menu Builder would take care of everything but maybe not?
Thanks,
Pete
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Menu Problem
Hello...
Open the menuBuilder... when you create a new menubar you will see an option to move objects down to accomodate the menubar.... if you are using the menubuilder on a Mac, just uncheck it...
be well
Dixie
Open the menuBuilder... when you create a new menubar you will see an option to move objects down to accomodate the menubar.... if you are using the menubuilder on a Mac, just uncheck it...
be well
Dixie
Re: Menu Problem
Thanks. Seems like that checkbox isn't available for an existing menu so I'm wondering if there's a property somewhere that I could unset instead of having to create a brand new menu and it's attendant scripts. Also, the menu in question is set as the stack menu bar so I'm not sure why it would have any effect on the card its assigned to.
Pete
Pete
Re: Menu Problem
Hi Pete,
check the global property "editmenus" in the docs (Rev dictionary)!
That is what you are looking for.
Best
Klaus
check the global property "editmenus" in the docs (Rev dictionary)!
That is what you are looking for.
Best
Klaus
Re: Menu Problem
Stil getting this problem. Seems there are two properties that affect menus and they both seem to be set correctly. menuBar is set to the name of the group that defines the menus and editMenus is set to false.
To re-state the problem. The menus are correctly displayed in the OSX menu bar at the top of the screen, not on the cards. Every time I run the application my main stack grows in vertical size by a few pixels added to the bottom. If I manually resize the card back to it's correct height, then run the application again, that card is displayed with the height it was before I manually changed it. There no scripts that do anything with resizing the card when the app opens. The stack is displayed as a pallette. Can't think of anything else that might be relevant.
Help!
Pete
To re-state the problem. The menus are correctly displayed in the OSX menu bar at the top of the screen, not on the cards. Every time I run the application my main stack grows in vertical size by a few pixels added to the bottom. If I manually resize the card back to it's correct height, then run the application again, that card is displayed with the height it was before I manually changed it. There no scripts that do anything with resizing the card when the app opens. The stack is displayed as a pallette. Can't think of anything else that might be relevant.
Help!
Pete
Re: Menu Problem
It may be worth trying a “preOpenStack” handler in the stack script of the application:
... you would have to put this in the stack script, then save as an application. This may seem like a rather crude “work around”, but it may help to isolate where the problem is- something to do with settings when the application is built, or some inadvertent result of scripting when the application loads. Useful Rev dictionary entries are “save” (this may relate to your app’s always loading the same size) and “height”. I am not running Rev in OS X, so I can’t reproduce the problem/test for solutions, but I have been a Mac user, particularly fond of the OS 9’s, and recall the difference in the way the menubar is treated. I also gather we are talking about a standalone application built in RevStudio or Enterprise, rather than a revLet in Media, whose height/width cannot be set by script.
Code: Select all
on preOpenStack
set the height of this stack to (the height you want)
end preOpenStack
... you would have to put this in the stack script, then save as an application. This may seem like a rather crude “work around”, but it may help to isolate where the problem is- something to do with settings when the application is built, or some inadvertent result of scripting when the application loads. Useful Rev dictionary entries are “save” (this may relate to your app’s always loading the same size) and “height”. I am not running Rev in OS X, so I can’t reproduce the problem/test for solutions, but I have been a Mac user, particularly fond of the OS 9’s, and recall the difference in the way the menubar is treated. I also gather we are talking about a standalone application built in RevStudio or Enterprise, rather than a revLet in Media, whose height/width cannot be set by script.
Re: Menu Problem
Thanks for the workaround, I'll give it a try. I've reported this to the Rev support team so we'll see what they come up with.
I'm using Rev Studio, but this happens in my standalone app and in the REV dev environment.
Pete
I'm using Rev Studio, but this happens in my standalone app and in the REV dev environment.
Pete