Behaviors handlers not found when re-opening stacks

Andre.Bisseret Andre.Bisseret at inria.fr
Mon May 31 08:43:43 EDT 2010


Bonjour,

  I am trying to modify an app. using behaviors,
To simplify, let's say that I have two independent stacks :
"stack 1.rev" and "stack 2.rev"

the behavior of stack 2 is set to the script of a button on stack 1  
(button "behaviorOfStack2")
The script of this button is :
------
on singBeep
beep 5
end singBeep
------
on this same stack 2 there is a group "group1" whose behavior is set  
to the script of a button on stack 1 (button behaviorOfGroup1)
The group is composed of 2 fields, the second is named "fldTarget"
The script of this button is:
-----
on openField
if the short name of the target is "fldTarget" then singBeep
end openField
-----
Works well: beep when opening the field "fldTarget" (either selecting  
in it, or coming in it from the first field by tab)

But
If I save and close these 2 stacks when I reopen them that does not  
work anymore (I get a "can"t find handler" error, and in tRev, the tab  
of the group's script opens up with some empty lines in it !!!??)

However, In the message box, If I ask for the behaviors of stack 2 and  
of group1 I get the right answer (also, the behavior of group1 is  
still there at the bottom of the Basic properties pane of the group).

Despite this, I have to set again the two behaviors (of stack 2 and  
group1) in order to get my openField handler working.

Is it normal to set again the behaviors of objects each time the  
stacks are opened? or am I missing something?

Thanks a lot in advance for any help


Best regards from Grenoble

André




More information about the use-livecode mailing list