"unsetting" behavior

Mark Wieder mwieder at ahsoftware.net
Sat Jul 27 18:06:08 EDT 2013


hi-

Saturday, July 27, 2013, 12:48:08 PM, you wrote:

> I'm looking at the need to be able to set & "unset" behaviors.

> If I have set the behavior of a field to some button, and then want it
> to go back to default behavior, is there any way to do this?  Do I
> need a null script?

> And how long does a "setting" last?  While I"m o the card? While the
> stack is open?  While the mainstack is open?

The behavior of an object is treated the same as any other property.
If you set it and save the stack, it's permanent. Until changed. If
you set it to empty, you're essentially clearing the behavior property
of the object, unlinking the object from its behavior button.

Think of setting or clearing the backgroundcolor of the field. It has
the same persistence characteristics: if you save the stack, it's
saved with the current property value; if you change the setting and
don't save it then the setting disappears when the stack is closed.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list