still not sure how to pass commands through stack
Posted: Tue Mar 31, 2009 5:58 pm
I have a main stack and a sub stack. I need for the cancel button on the substack to change the visibility of a graphic on the mainstack.
currently in the cancel button i call deleteRect.
then in the main stack script.
(the tRectInc is a number that is incremented based on which rectangle is being modified)
The problem, is that I am getting a "no such object" error when the script runs. It is correctly seeing the object name, but does not detect that there is an object of that name. Earlier scripts are correctly modifying the object so there is no question that it exists and is properly named. I believe that the problem occurs because I am calling the command from a substack and trying to modify a graphic on the mainstack. Is there something I need to add for the "on deleteRect" script to look in the right place for the designated rectangle?
currently in the cancel button i call deleteRect.
then in the main stack script.
Code: Select all
on deleteRect
global tRectInc
do "set the visible of graphic Rect" & tRectInc & " to false"
end deleteRect
The problem, is that I am getting a "no such object" error when the script runs. It is correctly seeing the object name, but does not detect that there is an object of that name. Earlier scripts are correctly modifying the object so there is no question that it exists and is properly named. I believe that the problem occurs because I am calling the command from a substack and trying to modify a graphic on the mainstack. Is there something I need to add for the "on deleteRect" script to look in the right place for the designated rectangle?