Stack mode vs style

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Feb 13 06:35:41 EST 2009


Hi Sarah,

You can consider the mode the effective style. The mode is changed by  
the style property, the go command (including the palette, toplevel,  
modal and modeless commands), and by the mode property itself. The  
style property is the only one that sticks.

If you use the go command, you can determine a mode (palette,  
toplevel) without actually changing the style. If you don't use a  
mode, the mode will be determined by the style property.

if you change the mode, the next time you use the go command without a  
mode, the style will be applied again.

Usually, I don't use the style and mode properties. I just use the go  
command while specifying a mode.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum

We are always looking for new projects! Feel free to contact us to  
discuss your custom software project!

On 13 feb 2009, at 04:14, Sarah Reichelt wrote:

> Hi All,
>
> I am a bit confused about a stack's mode versus it's style. The 2
> seems to do the same things but be able to be set independently and it
> is possible to have them set to conflicting settings.
>
> e.g. I have a stack where I set it's STYLE to palette. Needing to make
> it editable again, I used the contextual menu to set it's MODE to
> toplevel.
> This worked, but it's STYLE is still set to palette.
> Checking it's mode directly, it is 1 which according to the docs  
> means:
> "The stack is open and displayed in an editable window. A stack has
> this mode if its style is "topLevel" or if it was opened with the
> topLevel command."
>
> So my question is: which command should I use to set the mode/style  
> of a stack?
> Neither of the docs entries mentions that it is deprecated or included
> for compatibility.
> Setting the style is vastly easier than trying to remember which
> number means which mode, but it appears that the Rev IDE uses MODE and
> not STYLE which makes me wonder if STYLE is preferred.
>
> Any ideas?
>
> Cheers,
> Sarah




More information about the use-livecode mailing list