Menu Problem

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Menu Problem

Post by phaworth » Tue Feb 16, 2010 6:32 pm

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

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Menu Problem

Post by Dixie » Wed Feb 17, 2010 11:00 am

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

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Menu Problem

Post by phaworth » Wed Feb 17, 2010 5:52 pm

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

Klaus
Posts: 13865
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Menu Problem

Post by Klaus » Wed Feb 17, 2010 6:21 pm

Hi Pete,

check the global property "editmenus" in the docs (Rev dictionary)!
That is what you are looking for.


Best

Klaus

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Menu Problem

Post by phaworth » Wed Feb 17, 2010 7:10 pm

Thanks.

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Menu Problem

Post by phaworth » Sat Feb 20, 2010 5:58 pm

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

Regulae
Posts: 136
Joined: Tue Oct 20, 2009 6:05 am
Location: Australia

Re: Menu Problem

Post by Regulae » Mon Feb 22, 2010 5:55 am

It may be worth trying a “preOpenStack” handler in the stack script of the application:

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.

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Menu Problem

Post by phaworth » Mon Feb 22, 2010 8:39 am

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”