Standalone + stack - menubar goes where?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 222
- Joined: Wed Jun 21, 2006 7:33 pm
- Location: West of the Pecos
- Contact:
Standalone + stack - menubar goes where?
Before I start heading down the wrong path, I thought I'd ask this question:
With a standalone (which acts as the launcher) and another stack (which contains all the meat of what needs to be done and stored), where is the proper stack to locate the menubar?
Everything I need to have the menu items do I am currently doing with buttons in the stack (Print, backup, export, modify records, etc.) but, as you might imagine, I'm ending up with an ugly mess of buttons which I hope to consolidate into a menu:
File > Print... and Quit
Edit > Copy list to clipboard
Maintenance > Export, Backup, Import
I know how to create the menubar and its items, and craft the necessary scripts but, when I tried putting the menubar as part of (what will be) the standalone, I'm getting an error about a non-existent chunk even though I select the menuitem (Print... in this case) with the proper stack in the foreground. So I'm thinking the menubar should actually be part of the changable stack and not part of what will be the standalone.
Do I have my head wrapped around this properly? I'm guessing that the menubar would not actually appear if the standalone app is in the foreground but only when the changeable stack is.
My app is intended for Mac right now but will eventually be released for Windows and Linux (so I don't want to do something that I have to totally re-write later).
Thanks very much for advice and suggestions!
Barry
With a standalone (which acts as the launcher) and another stack (which contains all the meat of what needs to be done and stored), where is the proper stack to locate the menubar?
Everything I need to have the menu items do I am currently doing with buttons in the stack (Print, backup, export, modify records, etc.) but, as you might imagine, I'm ending up with an ugly mess of buttons which I hope to consolidate into a menu:
File > Print... and Quit
Edit > Copy list to clipboard
Maintenance > Export, Backup, Import
I know how to create the menubar and its items, and craft the necessary scripts but, when I tried putting the menubar as part of (what will be) the standalone, I'm getting an error about a non-existent chunk even though I select the menuitem (Print... in this case) with the proper stack in the foreground. So I'm thinking the menubar should actually be part of the changable stack and not part of what will be the standalone.
Do I have my head wrapped around this properly? I'm guessing that the menubar would not actually appear if the standalone app is in the foreground but only when the changeable stack is.
My app is intended for Mac right now but will eventually be released for Windows and Linux (so I don't want to do something that I have to totally re-write later).
Thanks very much for advice and suggestions!
Barry
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Standalone + stack - menubar goes where?
So you have a launch stack which opens the main stack and the launch stack is then closed. The menu would need to be in the main stack. If the menu were in the launch stack it would go away when the launch stack closes.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Posts: 222
- Joined: Wed Jun 21, 2006 7:33 pm
- Location: West of the Pecos
- Contact:
Re: Standalone + stack - menubar goes where?
I haven't actually hidden the launch stack but, if that's the proper method, I can do so. Should I assume this will also work if I deploy on Windows and Linux?
Thanks,
Barry
Thanks,
Barry
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Standalone + stack - menubar goes where?
Generally you want to first check to make sure that the main stack that you're going to open is there. If it is then open it and close the launch stack. If it's not there then provide some type of error dialog to the user.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Posts: 222
- Joined: Wed Jun 21, 2006 7:33 pm
- Location: West of the Pecos
- Contact:
Re: Standalone + stack - menubar goes where?
Makes sense. Thanks very much for your help.
Barry
Barry
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Standalone + stack - menubar goes where?
Windows and Linux have the menu bar attached to the top of the stack. If you put it where you need it for those platforms. when that stack opens on Mac it'll automatically shows those menus in the global menu bar.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Standalone + stack - menubar goes where?
In a standalone, the stack that is bound to the app (the splash stack) must remain open until the app closes. Hiding it is the correct method. You may need to "start using" the main stack, but I have not actually done an app using this format yet. And as others have said, the menus should go in the main stack (especially for Windows/Linux where they are a part of the actual window).
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker