Refreshing menubar when a menu label changes

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
paulclaude
Posts: 121
Joined: Thu Mar 27, 2008 10:19 am

Refreshing menubar when a menu label changes

Post by paulclaude » Wed Oct 22, 2008 3:28 pm

I'm trying to let the user changes dinamically the menubar language.

In effect, all menu names changes as expected but the Help menu; its label property is regularly changed, but the menu name on the menubar is not refreshed until I don't switch to the revolution menu and back (in the development environment).

There is a way to force the refreshing of the menubar?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Oct 22, 2008 6:12 pm

Hi paulclaude,

I assume this is on Mac. You can't change the Help menu that way. The operating system determines the label of the Help menu, depending on the language settings.

Instead, delete the Help menu and create a different menu button in the menubar group. Use this button as an alternative Help menu, but don't call the menu "Help".

If you change the label of the alternative "Help" menu, the change should be visible rightaway.

You can set the lockMenus to true while making changes, but you need to make sure that the lockMenus is set to false after you have changed the menu bar.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

paulclaude
Posts: 121
Joined: Thu Mar 27, 2008 10:19 am

Post by paulclaude » Thu Oct 23, 2008 8:10 am

Thanks Mark,

your "lockmenus" solution works perfectly for me to refresh the menubar.

My menubar changes dynamically "after" the app is open (a menu called "languages" is selected by users), so mac os can't change it. I've tried to let Mac Os recognize the language settings and makes changes to all menus at startup, but it doesn't works for me (Revolution puts empty folders, like English.proj, inside the package when creating standalones, but the menubar doesn't changes).

So your tip has solved my problem. :wink:

Post Reply