First stack to open in standalone should be modal

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
whelkybaby
Posts: 47
Joined: Sat Nov 17, 2007 6:04 pm

First stack to open in standalone should be modal

Post by whelkybaby » Sun Mar 30, 2008 6:58 pm

When my standalone opens, I want it to display a welcome window. In order to get the correct looking titlebar, I need to set it to modal (removes the traffic lights).

However, it doesn't appear that my app will do this when it loads from the desktop. I know it's getting the openStack message.

Am building the app for the Mac.

Thanks for any help,


Steve

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

Post by Mark » Sun Mar 30, 2008 9:21 pm

Hi whelkybaby,

You don't need to set a window style to modal to get a particular type of title bar. You can set the decorations by script, but you can also use the property inspector to do this.

If you set the style of a window to modal, all your script will halt until the window has closed. Only scripts that are executed from inside that window, e.g. by a preOpenStack message or a mouseUp message invoked by a button in that window, will be able to run.

A better approach may be to use a palette without title bar (set the decorations to empty). You could also use a modeless window, or even a toplevel window, and set the decorations to title, if you want to have a title but no other controls.

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

Post Reply