::fe.add_transition_callback(this, "on_transition");
fe.add_transition_callback(this, "on_transition");
Global variables are stored in a table called the root table. Usually in the global scope the environment object is the root table, but to explicitly access the global table from another scope, the slot name must be prefixed with '::' (::foo).exp:= '::' idFor instance:function testy(arg){ local a=10; return arg+::foo;} accesses the global variable 'foo'.However (since squirrel 2.0) if a variable is not local and is not found in the 'this' object Squirrel will search it in the root table.function test() { foo = 10;}is equivalent to writefunction test() { if("foo" in this) { this.foo = 10; }else { ::foo = 10; }}
so :: it indicates a global variable ... interesting, thanks.