How To : Initializing an Object
Contents |
[edit] Description
This document describes how to initialize a complex object (part of the Model), which has more than one field that needs to be set.
[edit] Prerequisites
Understanding Application Objects
Understanding Bungee's Approach to Constructors
Working with Bungee Logic
Understanding Bungee Logic
Site
Site Object
[edit] Procedure
To initialize an object:
- In the Property Editor, locate the Object you want to initialize.
- Click the arrow on the drop down box and select Object.
- Click the ellipsis next to the drop down box.
- This displays a dialog box containing the fields of the object you are initializing.
- In the dialog box, set an initial value for each field you want to initialize.
[edit] Error Handling
[edit] Examples
In the following example, the onCreate function is used to initialize people, which is a collection of Person. Two Person objects are added to people. With the first function call statement selected in the Design Editor, the parameters for the Collection, add function can be set in the Property Editor. In this case, since people is a collection of Person, when Object is selected in the parameter drop down box, the Builder creates a new instance of Person.
When the ellipsis button next to Object is clicked, the following dialog box is displayed. Person has two fields, firstName and lastName. The dialog box allows these two fields for this new Person to be initialized.
[edit] Next Steps
[edit] Tags