Hello Rob,
in fact there is no method to obtain access to the application instance except GetRoot(). GetRoot(), however, is limited to GUI components belonging to the application (components belonging to the view tree). In your case you intend to access the the application instance from some object which is not part of this view tree. What can you do?
Step 1: In your device class add a new variable to store there a reference to the application instance. Name it e.g. RootObject.
Step 2: I the application class add also a new variable to store there a reference to the DeviceClass autoobject. You can name it e.g. DeviceObject.
Step 3: In the application class override the Init method and implement following code to assign the autoobject to the DeviceObject variable and in the device object store the application instance in its own RootObject variable.
DeviceObject = YourUnit::Device;
DeviceObject.RootObject = this;
Step 4: In the DeviceObject you can access the application instance directly by using the RootObject variable.
Please note, the variable RootObject may remain initialized with null if you test some GUI component individually in the Prototyper without the application class or you edit a GUI component in Composer. In this case the application instance does not exist.
Does it help you further?
Best regards
Paul Banach