Page 1 of 1

First stack to open in standalone should be modal

Posted: Sun Mar 30, 2008 6:58 pm
by whelkybaby
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

Posted: Sun Mar 30, 2008 9:21 pm
by Mark
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