Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
on preOpenStack
palette this stack
pass preOpenStack
end preOpenStack
no effect. It does get called so that's not the problem. Doesn't work with the openStack handler either. But if I call "palette stack "palette test"" in the Message Window it works. If I add a button with the same code, it works. But I want it to be a palette when it launches.
The "palette" command is working correctly. The style of a stack is a permanent property and allows you to "go" to a stack, knowing it will always open as a palette (or whatever style is set.) The "palette" command will override the property setting on a one-time basis. If you use "palette myStack", the style property remains unchanged and if you just "go" to stack "myStack" later it will display in the original style again.
It's easier to see using the "toplevel" style. By default, all new stacks use style toplevel. You can display it differently on a case by case basis by issuing a command like "palette mystack", but the next time you close and then "go" to that stack it will display as toplevel again. If you ask about the style while it is showing on-screen as a palette, it will report "toplevel", because that's what it is.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
on preOpenStack
palette this stack
pass preOpenStack
end preOpenStack
no effect. It does get called so that's not the problem. Doesn't work with the openStack handler either. But if I call "palette stack "palette test"" in the Message Window it works. If I add a button with the same code, it works. But I want it to be a palette when it launches.
The stack window isn't drawn yet when preOpenStack triggers, so there is nothing onscreen to accomodate a command like "palette" -- which is a command to draw a window. That's why you need to set the style of the stack, so that when it is ready to display, it will display in the style you want.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com