Bungee Logic : Intrinsic : OnInit

Page Status: Beta
Jump to: navigation, search

Back to Bungee Logic Intrinsic Functions

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.

[edit] Example

 

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

[edit] See Also

Understanding Bungee's Approach to Constructors
OnChange

 

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