Announcement

Collapse
No announcement yet.

Valence.util.download is not a function

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

  • Valence.util.download is not a function

    Upgraded from 4.2 to 5.0. App created with Nitro AutoCode. List editor. Program comes up just fine. Trying to download gives the error:

    Uncaught TypeError: Valence.util.download is not a function

    Do you think I missed a step when I brought these over? My older stuff still works. In the console, I can use Valence.util.Helper.download, but not Valence.util.download, where in my 4.2 instance, I do have access to that.

  • #2
    Yes, Valence.util.download now lives under the Helper namespace (Valence.util.Helper). Looks like you will have to change your code on this one.

    Comment


    • #3
      Originally posted by sean.lanktree View Post
      Yes, Valence.util.download now lives under the Helper namespace (Valence.util.Helper). Looks like you will have to change your code on this one.
      Change it to what? I have the same issue and neither of the below work.

      var myvar = new Valence.util.Helper(); //gives error that it is not a constructor

      var ibmiuser = Valence.util.Helper.getUserName(); // returns error that it is not a function

      Comment


      • #4
        Originally posted by sean.lanktree View Post
        Yes, Valence.util.download now lives under the Helper namespace (Valence.util.Helper). Looks like you will have to change your code on this one.
        Change it to what specifically? I have the same issue coming from 4.1 to 5.0. the following does not work

        var myvar = new Valence.util.Helper(); //returns error constructor is not a function

        var ibmiuser = Valence.util.Helper.getUserName(); //returns error is not a function

        Comment


        • #5
          Hi Mike,

          I believe you emailed about this topic as well, but in case you were still looking for a response:

          Valence.util.Helper is a singleton. You do not need to construct it.

          Creating a new instance will fail because there is no constructor.

          However,

          Valence.util.Helper.getUserName() should return the user name as expected.

          I know in your email it looked like you were calling it with Valence.util.getUserName(). That wouldn't work in 5.0 as we moved it to the Valence.util.Helper namespace.

          Please let us know if you are still have an issue with calling these Helper functions.

          Thanks.

          Joe

          Comment

          Working...
          X