Class blade.core.Reflection
Object
|
+--blade.core.Reflection
- class
blade.core.Reflection
Allows objects to reference themselves using a globally-defined variable.
For example, setTimeout reqiures you to pass it javascript code in string form.
Unless an object is globally visible and knows its global name, it cannot
create a string to pass setTimeout that references itself. That's where
the Reflection class comes in.
As an example, an object could use the following code:
var ref = blade.core.Reflection.createReference(this);
setTimeout("blade.core.Reflection.getReference(ref).method_here()", . . .
Defined in common.js
Method Summary |
function
|
createReference(object)
Creates an integer reference to the object provided
|
function
|
getReference(index)
Returns the object associated with a reference
|
blade.core.Reflection
function blade.core.Reflection()
createReference
function createReference(object)
Creates an integer reference to the object provided
getReference
function getReference(index)
Returns the object associated with a reference