Announcement

Collapse
No announcement yet.

No dialog after askForInput() call

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • No dialog after askForInput() call

    Hi

    Sure there is a simple answer...

    I am calling askForInput in the code snippet below. However, no parameter dialog appears.

    Any ideas?

    Thanks, Roger

    ----------

    function preMain() {

    var x;

    //initialize formula parameters
    x=0;
    //define limit for stop
    aFPArray[x] = new FunctionParameter( "Limit", FunctionParameter.NUMBER);
    with( aFPArray[x] ) {
    setName( "Stop out (points)" );
    setLowerLimit( 1 );
    setUpperLimit( 40 );
    setDefault( 10 );
    }

    setStudyTitle("Test");
    setCursorLabelName("Test", 0);
    setPriceStudy(false);
    setDefaultBarFgColor( Color.blue, 0 );
    setShowTitleParameters( true );
    askForInput();
    setComputeOnClose();

    }

  • #2
    Re: No dialog after askForInput() call

    Roger
    To my knolwedge you need to have a main function with the FunctionParameter name in its arguments for the dialog box to display (see the enclosed revision of your code).
    Alex

    PHP Code:
    var aFPArray = new Array();
    function 
    preMain() {
        var 
    0;
        
    aFPArray[x] = new FunctionParameter"Limit"FunctionParameter.NUMBER); 
        
    withaFPArray[x] ) { 
            
    setName"Stop out (points)" ); 
            
    setLowerLimit); 
            
    setUpperLimit40 ); 
            
    setDefault10 ); 
        }
        
    setStudyTitle("Test"); 
        
    setCursorLabelName("Test"0); 
        
    setPriceStudy(false); 
        
    setDefaultBarFgColorColor.blue); 
        
    setShowTitleParameterstrue ); 
        
    askForInput();
        
    setComputeOnClose();        
    }
     
    function 
    main(Limit){





    Originally posted by RogerL
    Hi

    Sure there is a simple answer...

    I am calling askForInput in the code snippet below. However, no parameter dialog appears.

    Any ideas?

    Thanks, Roger

    ----------

    function preMain() {

    var x;

    //initialize formula parameters
    x=0;
    //define limit for stop
    aFPArray[x] = new FunctionParameter( "Limit", FunctionParameter.NUMBER);
    with( aFPArray[x] ) {
    setName( "Stop out (points)" );
    setLowerLimit( 1 );
    setUpperLimit( 40 );
    setDefault( 10 );
    }

    setStudyTitle("Test");
    setCursorLabelName("Test", 0);
    setPriceStudy(false);
    setDefaultBarFgColor( Color.blue, 0 );
    setShowTitleParameters( true );
    askForInput();
    setComputeOnClose();

    }

    Comment

    Working...
    X