I found a problem and I cannot find "the definitive solution".
This is the problem:
I created a group, called "g1", with two buttons inside, called "b1" and "b2":
Code: Select all
GROUP1
|
+--b1
+--b2
CODE FOR B1:
Code: Select all
send "whoAreYou" to button "b2"
Code: Select all
on whoAreYou
answer "I am b2-group 1"
end whoAreYou
Now, I duplicate this group (group "g1"), and in the same stack, I create this new copy called "g2". I simply change the code inside button "b2" to show the text: I am b2-group 2 <-- please note "group 2"
I do not change anything else, and I try to push button "b1" inside the new group "g2": SURPRISE! I get an answer from button "b2" inside group "g1"!!!!
I have some alternatives in my mind to solve this problem, but I don't like it. My purpose is creating a group where the objects inside refer only to other objects inside the group-self (even if another group with the same button name exists).
If I use card or stacks there are two wonderful properties called "this card" and "this stack": they refer to the object container. I think I need another property like "this group":
Code: Select all
send "whoAreYou" to button "b2" of this group -- DOES NOT WORK!
Code: Select all
answer "I am b2-" && the name of this group -- DOES NOT WORK!
(I think this is the best approach to realize a "full object-oriented" RunRev architecture).
Thank you for your help!