Bungee Logic : Intrinsic : OnInit

Page Status: Beta

Back to Bungee Logic Statements

Contents

[edit] Description

Each field member of a class has two intrinsic functions associated with it: OnInit and OnChange. Bungee Logic Statements added to the OnInit function run when the field is first created at runtime. This is similar to a Constructor in C++.

Note Fields that are persisted will not have their OnInit code run when the field is created. A persisted field will have its initial value supplied by the associated datasource.

[edit] Example

 

public int formChoice;
{
   OnInit
   {
      condition
      {
         case (myField == 1)
         {
            formChoice = 5;
         }
         default:
         {
            formChoice = 1;
         }
      }
   }
.
.
.

[edit] See Also

OnChange

 

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