How To : Initializing an Object

Page Status: Beta

Back to Concepts and HOW TOs

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:

  1. In the Property Editor, locate the Object you want to initialize.
  2. Click the arrow on the drop down box and select Object.
  3. Click the ellipsis next to the drop down box.
    1. This displays a dialog box containing the fields of the object you are initializing.
    2. 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


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.