How To : Providing a Main Class And Run Functions
Contents |
[edit] DEPRECATED
[edit] Description
You can either add a Main class (with associated run functions) to your main AppProject, or assign an existing class and functions to these roles.
[edit] Prerequisites
Understanding the Main Class and Run Functions
Understanding Solutions and Projects
Adding a Class to a Project
[edit] Procedures
[edit] Adding a Main Class and Run Functions
To add a main class and run functions to your AppProject
- If you have not done so, add an AppProject you want to act as the entry point to your application.
- Select the AppProject.
- On the Solution Explorer toolbar, click the orange Add Main Class button. The Main class appears under your AppProject, and the run and afterRenderInitialization functions appear in the Solution Details.
[edit] Making an Existing Class Your Main Class
To make an existing class and functions your main class and run functions
Note The "run" functions must be members of the class you assign to be your application's "main" class.
- If you have not done so, add an AppProject you want to act as the entry point to your application.
- Select the AppProject, then on the General tab of the Property Editor, on the Main Class for Application property click the ellipsis button [...] and choose the class you want to assign as the "main" class of your application.
- Select the function you want to act as your application's "Run" function.
- On the General tab of the Property Editor, on the Interface List property click the ellipsis button to assign the FunctionInterface:MainFunction function interface to that function.
If you want to optimize your application start time, select the function you want to act as your application's "afterRenderInitialization" function. - On the General tab of the Property Editor, on the Interface List property click the ellipsis button to assign the FunctionInterface:MainPostRenderInit function interface to that function.
[edit] Error Handling
[edit] Examples
When you select the Main class that you add in the first procedure above, you can see the functions that get added with the class. This is where you add your start up functionality. If you select one of these functions and look at the Interface List property, you can see the function interfaces used to identify these functions.

[edit] Next Steps
Adding a Page to an AppProject
Understanding Application Posting and Deployment



