You seem to be declaring a global inside a handler and then trying to access the global outside the handler without declaring the global.

Common practice is to declare global at the top of the script, and then it is accessible to any handler in that script.

Ex.
-- stack script
Global bobtest

On openstack
  put "hey" into bobtest
End openstack

On revealbobtest
  put bobtest -- the message box
End revealbobtest

The above works because the scope of the global is the stack script itself, NOT the handler, whose scope expires with the termination of the handler.

Hope this helps

Bob Sneidar
IT Manager
Calvary Chapel CM
Sent from iPhone

On Jul 2, 2008, at 17:56, Mikey <[EMAIL PROTECTED]> wrote:

If I do the following in a script:
put "north" into theButton
global status
put the hilite of bg button theButton into status

and check status, I get the value I expect, namely the hilite of the bg
button North.

However, if I
if the hilite of bg button theButton then

OR

if (the hilite of bg button theButton) then

I get a message execution error:  Error Description:  Chunk:  no such
object.

So if I combine both of these, status gets the value I would expect, but I
still get the error.

So what's wrong with my code, please?
--
Diogenes - "What I like to drink most is wine that belongs to others."
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to