"this me"?

Timothy Bleiler bleiler at buffalo.edu
Thu Aug 8 17:28:52 CEST 2013


On Aug 8, 2013, at 9:44 AM, Mike Kerner wrote:

> "The effective behavior" in no way implies "B" or "A" when reading it.  To
> me, anyway, it implies the script, not the container or the container's
> name.


Yes, it seems to have a more narrow application than some of the other suggestions. I can see how it might imply a reference to the script not the control. However, we set the behavior to a button reference, so "behavior" implies a control reference not a script reference. We don't set the behavior of control x to the script of button y. 

This discussion brings out some of the challenges and opportunities created by the new chained behaviors beyond the original, simpler case of a control with one behavior attached. In that case, you can write "Get the name of the behavior of me" and you have the behavior reference. But with chained behaviors I assume that only gives you the first behavior control in the chain. I think that's illustrated by Trevor's example in the forum post if I'm following it correctly.

So the problem comes down to how we think of chained behaviors. On one hand, we may view all the behavior scripts from a "chain" as being part of a single script attached to a control. Then, all the syntax using me, effective etc. are based on or refer to the final "owner" of all the behaviors. That's the mental model the syntax supports up through version 6.1.1. However, more flexibility is opened up if we have syntax that simultaneously allows us to think of the chained behaviors as a modified message path.  In a "modified message path model" we need to know which control in the chain we are "in" at a given time and its behavior, card or stack reference. Given a need to identify where we are in the chain I can see why the somewhat awkward "this me" was invented. I don't think any of the other syntax suggestions unambiguously identify where we are in the behavior chain at a given point of script execution.


Tim Bleiler, Ph.D.
Instructional Designer, HSIT
University at Buffalo



More information about the use-livecode mailing list