Platform Package reference: Function _GetAutoObject()
Description of the function _GetAutoObject() available in all Platform Packages for WebGL JavaScript compatible target systems. This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.
Declaration
function _GetAutoObject( aAutoObject )
Parameters
aAutoObject
Data structure representing the autoobject to access. This data structure and all associated contents are generated by Embedded Wizard.
Discussion
The function _GetAutoObject() returns an autoobject identified by aAutoObject. The function verifies whether the required object is already instantiated and if it's true, the existing instance is returned immediately. If no instance of the desired autoobject could be found, _GetAutoObject() prepares a new object of the corresponding class and initializes it properly. For example:
var device = EmWiApp._GetAutoObject( EmWiApp.Application.DeviceObject );
The created object will remain in memory as long as the object is in use. Objects, which are not in use anymore are automatically released during the next garbage collection.