Bungee Logic : Intrinsic : OnChange
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 OnChange function run whenever the value of the field changes at runtime.
The OnChange function contains an intrinsic variable, oldValue, of type Data. This variable contains the previous value of the field.
[edit] Example
public int formChoice;
{
.
.
.
OnChange
{
var Data oldValue;
condition
{
case (oldValue == 1)
{
formChoice = 3;
}
default:
{
formChoice = 2;
}
}
}
}
[edit] See Also