Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How can I troubleshoot "setShortDisplayFormat is not a function" after upgrading to SmartGWT 12.0?

    I have a bug with SmartGWT 6.0 but I want to first see if upgrading to the latest version will fix the issue before asking about it. So I downloaded GWT 12.1 but now basic functionality is not working. It looks like my EntryPoint's onModuleLoad is not even being called, so I don't know where to start debugging this and I am looking for some help.

    I tried SmartGWT 12.1 and 6.1 but both have the same issue. SmartGWT 6.0 works fine though with my code base.

    When I load the application in Chrome, I see the error in the attached screenshot in the developer tools.

    I searched the forum first and found the following:
    https://forums.smartclient.com/forum...ollowing-error

    However, in that specific case it looked like the setShortDisplayFormat error was due to duplicate loads, which I am not seeing in my output.
    Attached Files

    #2
    Never mind. In case anyone else encounters this, investigate the warnings before the setShortDisplayFormat error. In my case, it was "Failed to execute write on document". I debugged it more-or-less as follows:
    - go to the line of code with the error in the Google Chrome debugger (developer tools)
    - use the "{ }" button in the Google Chrome developer tools to make the code pretty so that the problematic code is on one line
    - put a breakpoint on the questionable line and reload the page
    - in my case, the code was something like the following:
    _2.document.write(_9)
    - it ended up that _9 was an HTML link to a CSS file from something else on this server that also uses Smart GWT, since I'm new to GWT, I'm not sure if one is an application and the other is a module, or what
    - anyhow, I was only rebuilding the one project I was interested in after upgrading to Smart GWT, after rebuilding the other one and copying both over, the one that I am interested in is now working... so they must be dependent on each other some how

    Comment


      #3
      Glad to hear you have the conflict sorted out. You must have been somehow pulling in Framework code from SGWT 5.0p/SC 11.0p or earlier, which doesn't define that method on isc.DateUtil.

      Comment


        #4
        Originally posted by Isomorphic View Post
        Glad to hear you have the conflict sorted out. You must have been somehow pulling in Framework code from SGWT 5.0p/SC 11.0p or earlier, which doesn't define that method on isc.DateUtil.
        I am running into the same issue here and we are from SGWT5.1P to 12.1, do we have any documents which show changes between this two, so I can identify the places need to be changed in our code?

        Comment


          #5
          If you are "running into the same issue" (as in exactly the same error message) then you don't need to change your code, you need to figure out how your GWT project is still pulling files from the older version of SmartGWT. The user above presented one way of figuring this out, but a potentially easier way is to just look at the "Network" tab in standard developer tools, and see where files are being loaded from - it may be a mix of locations, or if you look at the SmartClient runtime files themselves (like ISC_Core.js) you can see the version number right in the header.

          As far as the more general question of knowing what code to change, the release notes list anything you might need to know about backwards compatibility, but no code changes would be required between those two versions.

          Finally, if you in fact are not receiving exactly the same error message, please start a new thread with the actual error message you're receiving, as it's likely unrelated.

          Comment


            #6
            Originally posted by Isomorphic View Post
            If you are "running into the same issue" (as in exactly the same error message) then you don't need to change your code, you need to figure out how your GWT project is still pulling files from the older version of SmartGWT. The user above presented one way of figuring this out, but a potentially easier way is to just look at the "Network" tab in standard developer tools, and see where files are being loaded from - it may be a mix of locations, or if you look at the SmartClient runtime files themselves (like ISC_Core.js) you can see the version number right in the header.

            As far as the more general question of knowing what code to change, the release notes list anything you might need to know about backwards compatibility, but no code changes would be required between those two versions.

            Finally, if you in fact are not receiving exactly the same error message, please start a new thread with the actual error message you're receiving, as it's likely unrelated.
            Thanks for the clarification, yes, I got the same issue and able to find out the root cause by following you notes here.
            The problem is that we used to have a separate folder for the sgwt js/skin files like 'ISC_Core.js' etc... which I missed to upgrade them, after pointing them to the latest 12.1, the error has gone.

            one more thing to clarify, we used to have separate js/skin file for sgwt and sc, I believe in the new version they can share the same one from sc, right?

            Comment


              #7
              It’s not clear if you’re using SmartClient and SmartGWT in tandem, but either way, if you are using the same skin, they have always used the same files.

              Comment

              Working...
              X