Announcement

Collapse
No announcement yet.

getGlobalValue() pass by reference or value?

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

  • getGlobalValue() pass by reference or value?

    Just curious can this can call return by reference if I set a javascript object? Or is everything always returned by value?

  • #2
    Re: getGlobalValue() pass by reference or value?

    declared objects are passed by reference and follow JavaScript rules regarding their behavior. Since set and getGlobalValue() functions have the capability to exchange objects between global environments, you may run into problems with any eSignal or other object being pointed to the correct global environments (charts). Personally, I have not had problems with Array objects, but have had problems with eSignal objects from other global environments.


    I believe eSignal put together the series object and associated methods to establish a solid reference to different global environments, in addition to their correct sequencing. Based on my understanding, set and getGlobalValue() functions were not intended to to deal with this type of complexity.

    Originally posted by davewolfs
    Just curious can this can call return by reference if I set a javascript object? Or is everything always returned by value?
    Last edited by Guest; 08-18-2009, 05:19 PM.

    Comment


    • #3
      Re: Re: getGlobalValue() pass by reference or value?

      Seems like they do work. My idea was shot down anyways, seems like there might be an EFS bug, for some reason consecutive calls to rawtime(index) can cause my EFS script to simply stop. No idea why, but the debug statements show that to be the case and when I remove this call my program will loop as normal.

      I've given up on redrawing the screen, it's not a big deal anyways.

      Originally posted by stevehare2003
      declared objects are passed by reference and follow JavaScript rules regarding their behavior. Since set and getGlobalValue() functions have the capability to exchange objects between global environments, you may run into problems with any eSignal or other object being pointed to the correct global environments (charts). Personally, I have not had problems with Array objects, but have had problems with eSignal objects from other global environments.


      I believe eSignal put together the series object and associated methods to establish a solid reference to different global environments, in addition to their correct sequencing. Based on my understanding, set and getGlobalValue() functions were not intended to to deal with this type of complexity.

      Comment


      • #4
        Re: Re: Re: getGlobalValue() pass by reference or value?

        That is interesting, I am not seeing any problems with consecutive rawtime(index) calls when I tested that on my end. Regardless of the issue with redrawing the screen, If you could post your code, we could try and figure out why you are experiencing a problem with the rawtime(index) calls on your end.

        Originally posted by davewolfs
        Seems like they do work. My idea was shot down anyways, seems like there might be an EFS bug, for some reason consecutive calls to rawtime(index) can cause my EFS script to simply stop. No idea why, but the debug statements show that to be the case and when I remove this call my program will loop as normal.

        I've given up on redrawing the screen, it's not a big deal anyways.

        Comment


        • #5
          Re: Re: Re: Re: getGlobalValue() pass by reference or value?

          Originally posted by stevehare2003
          That is interesting, I am not seeing any problems with consecutive rawtime(index) calls when I tested that on my end. Regardless of the issue with redrawing the screen, If you could post your code, we could try and figure out why you are experiencing a problem with the rawtime(index) calls on your end.
          Unfortunately I cleaned up the code involving global values and moved on using local global values instead.

          Comment

          Working...
          X