Stack Properties

J. Landman Gay jacque at hyperactivesw.com
Sun Feb 25 22:31:53 EST 2007


Trevor Hopkins wrote:
> Hi,
> 
> I'm curious as to how to replicate the behavior of the ask/answer 
> dialogue windows on the Mac. These windows exhibit a couple of 
> properties that I would like to utilize in order to build my own 
> ask/answer dialogues, namely:
> 
> - when an ask or answer window is present, you cannot interact with 
> anything else on the screen other than with these windows. How is it 
> possible to set this behavior for a stack of your own?

Rev's ask/answer dialogs handle this for you, you don't have to do 
anything. On Mac OS 9 the ask/answer dialogs are modal and block all 
other user actions. But on Mac OS X the standard interface is to have 
dialogs "belong" to and be modal for only one window. Therefore, 
ask/answer dialogs will not allow any other actions in the current 
window, but the user is free to change windows or move to other 
applications. This is expected OS X behavior, and is the reason the 
"sheet" command was introduced.

> 
> - how can one create a stack using Rev on the Mac and get that stack to 
> assume the colouring of a default OS X window? When you create a stack, 
> its default colour is white. I'd like to make stacks appear like default 
> Mac OS X windows with the grey and subtle stripes in the background. 
> When you build an interface using Xcode's Interface Builder, the windows 
> are as they should be.

All windows whose style is "toplevel" will be white, but palettes, 
modeless, and modal windows use the OS stripes by default. To make your 
window patterned, set its style to something other than toplevel and 
don't use any backcolor or backpattern.

> 
> Finally, one comment about a Rev quirk I don't understand. I think that 
> when you create a stack on the Mac and you go to the "Size" area of the 
> Stack Inspector, that if you turn the "Resizeable" option off, the 
> option of maximizing a stack (using the green button on the top of the 
> Mac window) should automatically be turned off. That is, if you deselect 
> the "resizeable" check box, the controls for the stack should 
> automatically be adjusted by default. It would be silly to not be able 
> to pull open a stack but to still be able to maximize it.

Revolution leaves this up to the developer. Set the decorations of the 
stack to change the window behaviors. (Look at the "decorations" popup 
menu in the "Basic" pane of the stack inspector to see the various options.)

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list