The Preferences Menu

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
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

The Preferences Menu

Post by lohill » Mon Mar 08, 2010 9:23 pm

I am in need of a good tutorial on Menus. From previous discussions I have learned that if you put "Help" as the last item of your last menu (separated from the other with a dash item) and then script it in the on menuPick event in the button for the last menu button, it will work. Working means it will show up as the first item in the Application Menu and respond to your choice of it. That is what I am experiencing.

Similarly, I thought the Preferences menu was supposed to be the last item in you second menu. Again separated from the others with a dashed item. It's script would then be placed in the menuPick event for the button of the second menu. I get no response from the menu item when I take that choice even though I have a script for it. In the step-debug mode, no part of that script seems to get executed. I have tried using the name "Preferences" and "Preferences..." and still get no action with either. With either choice it seems to always appear as "Preferences..." in the menubar at the top of the screen (Mac). If I try to change the name of that item to "Preferences***", the MenuBuilder gives me a warning message that it is supposed to be "Preferences".

I tried placing "Preferences" after "Help" in the last menu and it shows up as "Preferences" in the Application menu right under Help. It also responds to the script which I place in the menuPick event for the last menu button. I would be happy with that except that now the Application menu shows "Help" followed by "Preferences" (both working) and then "Preferences...". The latter does nothing when chosen.

If there are no good tutorials available it might be helpful to get a reference to a, not too complex, application that utilizes menus well and perhaps even demonstrate how menues are handled bot for Mac and Windows. I would need code for this.

Thanks for any suggestions,
Larry

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

Re: The Preferences Menu

Post by Mark » Tue Mar 09, 2010 10:06 am

Hi Larry,

Revolution leaves the decision as to the name of the Preferences menu item to the operating system, which bases it's decision on the current language settings of the operating system. That means there's no way to change the name.

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

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: The Preferences Menu

Post by lohill » Tue Mar 09, 2010 6:54 pm

Mark,

If I had three menus named 'File', 'Edit' and 'Go' and wanted to script something that would handle an option for "Preferences...", which menu would have the option and where would I place the script?

Regards,
Larry

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

Re: The Preferences Menu

Post by Mark » Tue Mar 09, 2010 7:06 pm

Hi Larry,

I'm not sure what you mean with "option".

The Preferences menu item goes into the edit menu, just like you described.

The script for that menu item and the entire Edit menu goed into the menu button named Edit. If you do this with the menu builder, it should all be evident.

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

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: The Preferences Menu

Post by lohill » Tue Mar 09, 2010 9:54 pm

Hi Mark,

Sorry for the confusion. By 'option' I did mean the 'Preferences' option the way you interpreted it. AND I am embarrassed to admit that in my haste to make a simple example of my problem, I used for my Edit menu one where I was not going to to use the cut, copy, paste etc. Instead of disabling those choices individually I disabled the whole menu. No wonder my choice for 'Preferences' did not work.

Additionally I learned that even though the choice for 'preferences' is followed by three dots on the Application menu of my Mac, the choice in the menuPick script must not have any dots.

Thanks for your patience,

Larry

Post Reply