A Single SetProp?
Dick Kriesel
dick.kriesel at mail.com
Fri Jan 19 20:55:37 EST 2007
On 1/19/07 5:16 PM, "Scott Rossi" <scott at tactilemedia.com> wrote:
<snip>
> wondering if there is a way to trigger a single SetProp structure (that
> contains a switch statement) when setting *any* custom property, or do you
> have to use a separate SetProp structure for *each property* you want to
> monitor. Something like:
>
> setProp anyOfMyProps pValue
> switch anyOfMyProps
> case "propA"
> doSomeStuff
> break
> case "propB"
> doOtherStuff
> end switch
> end anyOfMyProps
</snip>
Your suggestion is a lot like what you can do for any number of custom
properties all in the same custom property set:
setprop uMyCustomPropertySet[pCustomProperty] pValue
switch pCustomProperty
case "propA"
put 1 into tValue
break
case "propB"
put 2 into tValue
default
put 3 into tValue
end switch
ask the params & cr & tValue
set the uMyCustomPropertySet[pCustomProperty] of the target to tValue
end uMyCustomPropertySet[pCustomProperty]
See "setprop" in the dictionary.
-- Dick
More information about the use-livecode
mailing list