Announcement

Collapse
No announcement yet.

Any get methods for functionparameters?

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

  • Any get methods for functionparameters?

    Are there any getXXX methods available for the FunctionParameter object? Currently we are forced to save the variables set in FunctionParameter to a global variable if we want to use those variables in functions other than main. When you have a large number of FunctionParameter's being used, it would make life easier (and code less code) if we could just query the FunctionParameter object.

    If this doesn't exist, it is a feature I would like to see added...it should be very trivial to code.

    Thanks,

    Garth
    Garth

  • #2
    Hi Garth,

    Yes, this is possible, at least indirectly. You have to use the arguments property of the main function as follows:

    main.arguments[0] - the first one
    main.arguments[1] - the second one, etc...


    Look here for my JavaScript references and links file and search it for a link to argument functionality. This link lays out the arguments property associated with all functions and it also identifies its associated properties.

    Hope this helps.
    Last edited by ; 04-26-2008, 08:23 PM.

    Comment


    • #3
      Thanks Steve,

      If I understood this correctly, it almost does what I need, in that I can get the value of the arguments, but I would also need the names to do what I need. Unless I am missing it, there doesn't appear to be a way to get the name as well.

      Garth
      Garth

      Comment

      Working...
      X