Hi. Is there a functional difference or functional efficiency (less RAM consumed) between the following two formats in setting up a FunctionParameter Object? The first is that suggested in eSignal’s EFS Developer’s Reference and the second I’ve occasionally come across in file sharing. Thanks.
Mike
Method 1
var aFPArray = new Array()
function preMain()
var x;
x=0;
aFPArray[x] = new FunctionParameter( "Param1", FunctionParameter.NUMBER);
with( aFPArray[x] ) {
setName( "Numeric Menu Option" );
setLowerLimit( 5 );
setUpperLimit( 125 );
setDefault( 40 );
}
x++;
aFPArray[x] = new FunctionParameter( "Param2", FunctionParameter.STRING);
with( aFPArray[x] ) {
setName( "String Menu Option" );
addOption( "String1" );
addOption( "String2" );
setDefault( "String1" );
}
Method2
var fp1 = new FunctionParameter("cBull", FunctionParameter.COLOR);
fp1.setName("Bullish Candles");
fp1.setDefault(Color.green);
var fp2 = new FunctionParameter("cBear", FunctionParameter.COLOR);
fp2.setName("Bearish Candles");
fp2.setDefault(Color.red);
Mike
Method 1
var aFPArray = new Array()
function preMain()
var x;
x=0;
aFPArray[x] = new FunctionParameter( "Param1", FunctionParameter.NUMBER);
with( aFPArray[x] ) {
setName( "Numeric Menu Option" );
setLowerLimit( 5 );
setUpperLimit( 125 );
setDefault( 40 );
}
x++;
aFPArray[x] = new FunctionParameter( "Param2", FunctionParameter.STRING);
with( aFPArray[x] ) {
setName( "String Menu Option" );
addOption( "String1" );
addOption( "String2" );
setDefault( "String1" );
}
Method2
var fp1 = new FunctionParameter("cBull", FunctionParameter.COLOR);
fp1.setName("Bullish Candles");
fp1.setDefault(Color.green);
var fp2 = new FunctionParameter("cBear", FunctionParameter.COLOR);
fp2.setName("Bearish Candles");
fp2.setDefault(Color.red);