A funny story: parent script for stack

Andre.Bisseret Andre.Bisseret at inria.fr
Sat Jan 16 05:59:30 EST 2010


Once upon a time (yesterday:), in order to get the same script for  
several list fields of a substack, I created a button as a behavior on  
this substack.
  Its script included a visual effect and a "find the selectedLine of  
list fields" (in order to go to a corresponding .card).

Then, from the message box, I set the behavior of several list fields  
to the long ID of this button.

I got a festival of visual effects!!!!

Clicking on any locked field triggered a visual effet, often 2 or 3 in  
a row! and this even on the main stack of the substack!
More, I was getting the same when selecting any row in any data grids  
of  the main stack!!!

Well, first of all, I tested If knocking at the door of my office  
triggered the same series of visual effect on my stack ;-o)) No!  
bizarre!

At last, I noticed that, on my tRev window, the substack was flagged  
as having a "Parent script"!
Ouups! I had inadvertently set the behavior of the substack to the  
behavior button (I had not think yet this was possible).

So I set the behavior of stack "mySubstack" to empty.
"bam" (as Jerry says ;-); all was in order!
THE END

So, as stacks can inherit a behavior, why this property is not  
included at the bottom of the basic properties pane of the Inspector,  
as it is for fields and buttons?

Once more : thank you Jerry for your superb tRev tool :-)

Best regards from Grenoble

André




More information about the use-livecode mailing list