App Method
An intrinsic instance of the Application class that represents the application.
Syntax
App
App.App
Notes
The App class represents the application itself (as opposed to a window or control). This allows you access to the Application class's properties, events, and methods without having to explicitly store a reference to it. If you have created a class that is a subclass of type Application, the App class will return a reference to that class.
In the Project Editor, the App class's Super class is Application for Desktop Applications. If you create a Console Application, its Super class is ConsoleApplication.
Examples
This example changes the application's MouseCursor to the Wait cursor:
Note: Access to the application's resource fork is supported only on Macintosh. Check the value of the TargetMacOS constant before attempting to open a resourcefork.
The following example uses the DoEvents method to yield time back to REALbasic in the middle of a loop. If you create PushButtons with and without the DoEvents method you will see how it allows REALbasic to handle other tasks while the loop is running.
Often it is better to use a Thread to perform lengthy operations in the background rather than using DoEvents in this manner.
See Also
Application, ConsoleApplication, MDIWindow, ServiceApplication classes; System object.