FunctionParameter Object |
Top Previous Next |
FunctionParameter Object
The FunctionParameter Object class is a set of objects and functions that allow you to manage your input parameters in a EFS script.
FunctionParameter Constructor
FunctionParameter( paramString, paramType )
Parameter Types
FunctionParameter Methods
Usage
var aFPArray = new Array();
function preMain() var x;
//initialize formula parameters x=0; //define a numerical menu option aFPArray[x] = new FunctionParameter( "Param1", FunctionParameter.NUMBER); with( aFPArray[x] ) { setName( "Numeric Menu Option" ); setLowerLimit( 5 ); setUpperLimit( 125 ); setDefault( 40 ); } x++; //define a string list menu option aFPArray[x] = new FunctionParameter( "Param2", FunctionParameter.STRING); with( aFPArray[x] ) { setName( "String Menu Option" ); addOption( "String1" ); addOption( "String2" ); setDefault( "String1" ); } x++; //define a color menu option aFPArray[x] = new FunctionParameter( "Param3", FunctionParameter.COLOR); with( aFPArray[x] ) { setName( "Color Menu Option" ); setDefault( Color.blue ); } x++; //define a boolean menu option aFPArray[x] = new FunctionParameter( "Param4", FunctionParameter.BOOLEAN); with( aFPArray[x] ) { setName( "Bool Menu Option" ); setDefault( true ); }
}
//make sure that our 4 menu parameters are included in main's declaration function main( Param1, Param2, Param3, Param4 ) {
}
|