setProp and Lock messages

Pete pete at
Mon Dec 5 13:25:27 EST 2011

No I don't think you're missing anything - I am :-)

I'm sure what you said is correct although I haven't tried it.  The example
in the manual regarding the use of lockMessages seems to relate to a
setProp handler at the stack level to handle a custom property used by all
cards in the stack.  My poor brain can't discern why that would result in
recursion since the example specifically sets the custom property of the
target which presumably would be the card from which the set command

Anyway, I agree we're pretty much talking about the same thing but we kinda
got off the topic of documentation discrepancies.  Turns out my assertion
that the use of lock messages in a setProp handler isn't a documentation
error - I just happened to read one of the reference manual notes about it
instead of all of them, my bad.

I'm still trying to figure out what to do regarding the use of setProp
handlers and the likelihood of lock messages being true when they are
called.  In a self contained application it's just a case of careful coding
habits but in the case of a library of handlers provided for the use of
other developers, there is no control over what another developer might do
in their own code before calling a handler in the library that issues a
setProp command, other than make it very clear that setting lock messages
to true might produce "unexpected results".  I'm leaning towards abandoning
setProp/GetProp in favour of the localised handler approach(which I use
elsewhere in my library for other purposes.

The dictionary entry for lock messages doesn't exactly inspire confidence

"Sets the lockMessages property to true, preventing setProp triggers,
getProp calls, and certain messages from being sent."

Which "certain messages"?

On Mon, Dec 5, 2011 at 9:39 AM, Richard Gaskin
<ambassador at>wrote:

> In my pre-coffee state it seems we're looking at the same thing, with one
> small but important distinction:
> Recursion will not occur if the setProp handler for a given property label
> sets the value of a property using that label, BUT if it calls any other
> handler which sets that property then recursion will occur.
> Did I miss something?
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting:
>  Webzine for LiveCode developers:
>  LiveCode Journal blog:**blog.irv<>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

Molly's Revenge <>

More information about the Use-livecode mailing list