prehandler: (was: Locking size and position)
J. Landman Gay
jacque at hyperactivesw.com
Fri Jan 8 20:05:58 CST 2010
DunbarX at aol.com wrote:
> OK, as mainly a development aid I see all that.
> Rev is far less forgiving about trapping reserved words than you-know-what,
> so (I think) I cannot write a handler that traps "set", checks to see if my
> immovable object is in danger, and acts appropriately.
Right. None of the command or function keywords pass through the message
hierarchy, they go directly to the engine, so you can't intercept.
That's one of the reasons Rev is so fast.
> There was discussion a while back to have a universal handler trap in the
> engine, way in the front, that could be analyzed at will. What do you think?
> Before even the frontscripts, offer a control structure like:
> on preHandler theMessage,paramList
> end preHandler
> It almost always just passes the usual stuff through, but you could check
> it at will to see, perhaps, if 'myImmovableObject' was somewhere in the
> paramList, and catch the "set" message that might be about to change its loc.
I used to be adamant that we needed a feature like that. I changed my
mind because there was always some other way to do what I needed. Old
habits die hard, but eventually they do hibernate.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode