
To view, right-click a Program and select Program Editor. It shows Edit, Slots, Imports, and Source tabs.
| Tab | Description |
|---|---|
| Edit | Edits the onExecute, onStart, onStop and freeForm methods. An example from the demo Database follows:BStatusNumeric inA = getInA();
BStatusNumeric inB = getInB();
BStatusNumeric out = getOut();
out.setValue( inA.getValue() + inB.getValue() ); |
| Slots | Shows and changes the slots of the program component. It includes Slot, #, Name, Display Name, Definition, Flags, Type and, Facets for each slot. |
| Imports | Shows the modules that have been imported. It also allows the following:
|
| Source | Edits the source of the program component. The editor supports special Color coding for Java Files. An example from the demo
Database follows:/* Auto-generated ProgramImpl Code */
import java.util.*; /* java Predefined*/
import javax.baja.sys.*; /* baja Predefined*/
import javax.baja.status.*; /* baja Predefined*/
import javax.baja.util.*; /* baja Predefined*/
import com.tridium.program.*; /* program Predefined*/
public class ProgramImpl
extends com.tridium.program.ProgramBase
{
////////////////////////////////////////////////////////////////
// Getters
////////////////////////////////////////////////////////////////
public BStatusNumeric getOut() { return (BStatusNumeric)get("out"); }
public BStatusNumeric getInA() { return (BStatusNumeric)get("inA"); }
public BStatusNumeric getInB() { return (BStatusNumeric)get("inB"); }
////////////////////////////////////////////////////////////////
// Setters
////////////////////////////////////////////////////////////////
public void setOut(javax.baja.status.BStatusNumeric v) { set("out", v); }
public void setInA(javax.baja.status.BStatusNumeric v) { set("inA", v); }
public void setInB(javax.baja.status.BStatusNumeric v) { set("inB", v); }
////////////////////////////////////////////////////////////////
// onExecute
////////////////////////////////////////////////////////////////
public void onExecute()
throws Throwable
{
BStatusNumeric inA = getInA();
BStatusNumeric inB = getInB();
BStatusNumeric out = getOut();
out.setValue( inA.getValue() + inB.getValue() );
}
} |
The
The