defining and using globals in an application

Mark Wieder mwieder at ahsoftware.net
Thu Jul 7 11:38:25 EDT 2011


Chris-

Thursday, July 7, 2011, 7:50:41 AM, you wrote:

> Actually you can, and I just tested it to be sure. I've got two buttons, one
> with "global TestVar" and a mouseup handler that adds 1 to TextVar then
> answers it, and a second button that has "local TestVar" and does the same
> thing.

Interesting. I *did* try myself before posting, but I did this in the
same script:

on mouseUp
  global xyzzy
  local xyzzy
end mouseUp

and the compiler properly complains about that. I guess it's not quite
smart enough to catch this across different scripts. I'd file a bug
about this, but since I don't use global vars anyway I don't think
I'll bother.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list