Customizing menus at runtime
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Customizing menus at runtime
Hi all,
I'm having these issues with menus....
- from Mac OS X standalone build I need to detect when the user selects the "About..." default menu item
- from the same build I'd like to add a "Preferences" menu item after the default "About", can this by done with scripting without having to recreate e new menubar ?
Thanks a lot for your help, this thing is giving me a lot of headaches !
Livecode's Menu Editor seems to be left from the pre-OSX era and menus designed with it behave erratically in standalones...
I'm having these issues with menus....
- from Mac OS X standalone build I need to detect when the user selects the "About..." default menu item
- from the same build I'd like to add a "Preferences" menu item after the default "About", can this by done with scripting without having to recreate e new menubar ?
Thanks a lot for your help, this thing is giving me a lot of headaches !
Livecode's Menu Editor seems to be left from the pre-OSX era and menus designed with it behave erratically in standalones...
Re: Customizing menus at runtime
Hi iGerbil,
1. welcome to the forum!
2. Since a "menubar" in Livecode is nothing but a bunch of grouped buttons, you can do everything by script!
I would advice to take a look at these stacks, especially "Menus", to get started with Livecode and menus:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
1. welcome to the forum!
2. Since a "menubar" in Livecode is nothing but a bunch of grouped buttons, you can do everything by script!
I would advice to take a look at these stacks, especially "Menus", to get started with Livecode and menus:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: Customizing menus at runtime
Hi Klaus,
thanks for your reply, but I already had a look at your stacks
I've already tried to use Livecode's menu builder, but it does not work... If you build a standard menu from the menu builder and set it as defaultmenu you get a bizarre "Preferences..." item on the first menu after the Apple menu, and the "About" item that was there disappears...
And if you try to change items in the first menu nothing works...
For me it would be enough to intercept when the user selects "About" from the standard menu created in Livecode's compiled app...
thanks for your reply, but I already had a look at your stacks
I've already tried to use Livecode's menu builder, but it does not work... If you build a standard menu from the menu builder and set it as defaultmenu you get a bizarre "Preferences..." item on the first menu after the Apple menu, and the "About" item that was there disappears...
And if you try to change items in the first menu nothing works...
For me it would be enough to intercept when the user selects "About" from the standard menu created in Livecode's compiled app...
Re: Customizing menus at runtime
Hi iGerbil (wasn't GERBILS an Apple Rollercaster simulation or VR or something?),
This IS in fact a Mac specific HIG thingie, highly irritating
You need to put these menuitems into the right Livecode place and OS X will put these into ITS right place.
This only affects these three menus:
1. File
LC: That last menuitem here must be -> QUIT
OS X: Will put this as the LAST menu item into the Applicartion menu!
2. Edit
LC: That last menuitem here must be -> Preferences
OS X: Will put this as the SECOND menu item into the Applicartion menu!
3. Help
LC: That last menuitem here must be -> About
OS X: Will put this as the FIRST menu item into the Applicartion menu!
Get the picture?
Hope this helps!
Best
Klaus
This IS in fact a Mac specific HIG thingie, highly irritating
You need to put these menuitems into the right Livecode place and OS X will put these into ITS right place.
This only affects these three menus:
1. File
LC: That last menuitem here must be -> QUIT
OS X: Will put this as the LAST menu item into the Applicartion menu!
2. Edit
LC: That last menuitem here must be -> Preferences
OS X: Will put this as the SECOND menu item into the Applicartion menu!
3. Help
LC: That last menuitem here must be -> About
OS X: Will put this as the FIRST menu item into the Applicartion menu!
Get the picture?
Hope this helps!
Best
Klaus
Re: Customizing menus at runtime
Hi Klaus,
you must come a long way from the Apple world Yes, gerbils were a 3D rollercoaster simulation when the QuickDraw 3D API was released... some years ago, even before Steve came back to Apple and QuickTime was at version 2.0
Back to menus, yes, that's irritating, and implementation in Livecode is not that intuitive....
Well, can't complain after all, the guys at Livecode have made so many amazing things, they can be forgiven for leaving menu stuff behind...
Thanks for your help !
iGerbil
you must come a long way from the Apple world Yes, gerbils were a 3D rollercoaster simulation when the QuickDraw 3D API was released... some years ago, even before Steve came back to Apple and QuickTime was at version 2.0
Back to menus, yes, that's irritating, and implementation in Livecode is not that intuitive....
Well, can't complain after all, the guys at Livecode have made so many amazing things, they can be forgiven for leaving menu stuff behind...
Thanks for your help !
iGerbil
Re: Customizing menus at runtime
Ah, yes, QuickDraw 3D! Thanks!
Yep, I started in 1992 with a Mac LC (1) with MacOS 6.xxx and about 2148 diskettes with the update to OS 7!
That was my first computer ever!
Yep, I started in 1992 with a Mac LC (1) with MacOS 6.xxx and about 2148 diskettes with the update to OS 7!
That was my first computer ever!
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Customizing menus at runtime
If you are registered for the RevLive Conference, either in person or by video streaming, I'm doing a presentation on how to set up and use menus in LiveCode. It covers this question and many others, complete with pictures and diagrams. The session is on Thursday afternoon.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com