Registers an object with the Skyline Globe framework.
registerObject(name, obj, [overwriteExisting])
|
Parameter |
Description |
|
name |
The name of the object to register This name will later be used to access the object |
|
obj |
The object to register |
|
overwriteExisting |
Optional, default: true If the name already exists, this parameter determines if the object to register will overwrite the existing object which is under that name |
Return Value
If the method succeeds, the return value is true. If the method fails, the return value is false. SGFramework.lastError contains the failure reason.
Remarks
It is sometimes useful to register an object with the framework globals. For example, if a tool is being developed and an object within that tool has to be available to other tools, that object can be registered with the framework (giving it a name such as mySpecialObj). Other tools can then ask the framework to retrieve that object and start using it.