Messages in setprop...
Richard Gaskin
ambassador at fourthworld.com
Tue Nov 29 08:22:48 EST 2005
Gilberto Cuba wrote:
>
> Hi,
>
> I'm working in a "setprop" of the "property set", that is to say, group of property, and detect that I modified or set a value of a property of the same group or "property set", the message dont triggered. How I can do this message occur?
>
> Example:
>
> setprop MyPropSet[propName] newValue
>
> switch propName
> case "Prop1"
> -- (1)
> set the MyPropSet["Prop3"] of me to value
> break
> case "Prop2"
> ...
> -- do something...
> ...
> break
> case "Prop3"
> ...
> ...do something... (2)
> ...
> break
> end switch
>
> end setprop
>
> When i set a value to a property "Prop1", it come in to (1), but when the next line is executing, it dont pass for (2).
> I hope you might understand.
setProp messages aren't sent when changing the value of the property
being handled, to avoid recursion issues. In your example, any setting
of MyPropSet from another handler will trigger your setProp, but any
settings of MyPropSet from within the setProp handler itself won't send
an additional message.
What are you looking to do?
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list