Announcement

Collapse
No announcement yet.

EFS parameter passing problem

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

  • EFS parameter passing problem

    Hi, I'm developing a custom EFS indicator. I'm new at this, so please bear with me. I'm running eSignal 7.7 candidate, build 664.

    A number of user inputs are passed in as parameters through my main() function, with apprpriate checking for nulls, defining default values, as shown in the EFS Help Guide.

    As of last night (sunday night), everything was working fine with my input parameters. No problems.

    When I loaded up everything Monday morning, with no changes to my script code that I am aware of, the input parameters are not getting defined and I can't access them thru the Edit Studies dialog as before. It's like my environment is hosed somehow.

    If I hardwire the inputs, the formula works properly, there are no apparent syntax problems, etc. There is just no communication with the formula allowing me to set the user inputs in any way.

    What's going on?

    An additional datapoint, after getting the "standard" parameter-passing mechanism working through the main() call last night, I then tried using the Function Parameter class mechanism to soup up the user input interface, handle initialization and defaults more cleanly, etc. I placed a call to askForInput() in my preMain() function.

    This was working fine too, except that I ran into the boolean problem (two of my parameters were boolean switches), but I worked around this .. the inputs were coming in as strings anyway.

    This morning when I encountered this situation, at first I was running the improved version using the Function Parameter calls. It didn't work anymore, none of that code seemed to have any effect, including my call to askForInput(). So I commented out the newer version and reverted to the standard way of doing things thru main(), with ==null checks and such. That didn't work either and I could no longer see any of the input params in the Edit Studies dialog.

    I'm guessing that it's the same problem that's hosing both versions of my code, and it seems to have something to do with the environment rather than the code itself.

    Sorry to be so long-winded.
    Thanks for any clues you can provide.

    Greg.

  • #2
    Greg
    Without seeing the efs it is somewhat difficult to identify what the problem could be .
    Irrespective, did you add any comments anywhere in main()? If yes do any of those comments include the word main()? If yes delete the word main() and see if that makes any difference.
    Alex

    Comment


    • #3
      That's it! (Apparently) ...

      I did have some comments with the words main(), and also preMain(), documenting some aspects of my code.

      I deleted them from the main() function, that didn't change the offending behavior. Then I noticed there were also some in my preMain() function body .. I deleted these too and then things started working right again .. at least now I can edit the parameters through the Edit Studies dialog. I'll have to do some more work to put everything back the way it was.

      It would seem that the interpreter, or whatever it is that executes the script code, is not entirely serious about comments!

      Should I take care to exclude all reserved words from my comments?

      Does it make any difference if the are /* */-style comments versus the // style? (I prefer the latter).

      Thanks for your help.

      Greg Onstott

      Comment


      • #4
        Greg
        Glad to hear you have the efs running again.
        By what I have seen posted so far in these forums it seems that the problem is caused only by the word main() when it includes the open/close parenth (your experience shows it can be in preMain() too not just main()).
        I don't know if other reserved words can cause issues or which comment style is preferable.
        Alex

        Comment

        Working...
        X