How To : Providing a Main Class And Run Functions

Page Status: Beta
Jump to: navigation, search

Back to Concepts and HOW TOs

Contents

[edit] DEPRECATED

2008.4 release

 

 

[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

  1. If you have not done so, add an AppProject you want to act as the entry point to your application.
  2. Select the AppProject.
  3. 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. 

  1. If you have not done so, add an AppProject you want to act as the entry point to your application.
  2. 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.
  3. Select the function you want to act as your application's "Run" function.
  4. 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.
  5. 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

[edit] Tags

    Copyright © 2005 - 2008 Bungee Labs. All rights reserved.