Lock Messages and getProp/setProp...

Richard Gaskin ambassador at fourthworld.com
Fri Oct 28 13:30:09 EDT 2016


Paul Dupuis wrote:

 > I will periodically want to 'lock messages' so that preopen... and
 > open... handlers and the like do not fire as a handler is making
 > changes. However, I find that I WOULD like to use custom properties in
 > those handlers that have a getprop or setProp handler and the lock
 > messages prevents them from functioning.
 >
 > Is it only me, or does anyone else wish there existed a:
 >
 > lock messages except for properties
 >
 > version of the lock messages command :-)

There have been a few threads on this over the years, and the general 
consensus seems to be agreement that getProp and setProp would be so 
much more useful if they were treated as custom messages rather than 
system messages, and as such become immune to lockMessages.

But IIRC there's something about the implementation that makes it 
difficult to change that without introducing risk of recursion.  Mark 
Waddingham could explain it better than I could.

So for now I rarely use them except on solo projects or in very small 
teams where we can guarantee how and when lockMessages is used.

They could be great triggers, so logically satisfying if only they were 
predictably robust.  These days I just use commands and functions as 
accessors instead.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list