Announcement

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

    SmartGwtProDebugNoscript.xml

    Is there any reason why SmartGwtProDebugNoscript does not exist?

    I presume I can build my own XML file that includes all the inherits to make it inject the readable version of SmartClient JS code. Or am I wrong?

    It would be handy to have this for debugging those javascript crashes.

    #2
    This seemed to be a little less trivial than I had hoped and looks like it requires repackaging of modules to achieve this (maybe it does not, but my attempts failed)

    If it's not too much work, could you please add this to the SmartGWT 2.5 Pro release. Debugging JS sometimes gives valuable clues as to what went wrong.

    Comment


      #3
      Isomorphic: is it possible for me to use the SmartClient Debug code with Pro? (ie, the non-minified/scrambled javascript source) This would really help me out in terms of debugging.

      Likewise, it would be good for you because of (a) cutting down false bug reports from user error (b) I could suggest where the problem is.
      Last edited by atomatom; 14 Jul 2011, 05:47.

      Comment


        #4
        I think I get how I can do this myself

        1) Download the SmartClient source
        2) Extract the smartgwt.jar file
        3) Copy the un-scrambled JS files in
        4) Create a new smartgwt.jar file

        Comment


          #5
          So, I tried this using module imports. This does not work.

          Code:
          <module>
          	<inherits name="com.smartgwtpro.SmartGwtProNoScript" />
          	<!-- <inherits name="com.smartclientpro.SmartClientProDefault" /> -->
          	<inherits name="com.smartclient.debug.SmartClientDebug" />
          
          	<define-linker name="smartgwt" class="com.smartgwt.linker.SmartGwtLinker" />
          	<add-linker name="smartgwt" />
          </module>
          After some tracing into DataSource it seems there is really no way I can use SmartGWTPro with SmartClient source code that is readable (ie, the code in smartgwt.jar).

          Code:
          if (dataFormat == "iscServer" && !this.clientOnly && !isc.hasOptionalModule("SCServer")) {
                      if (this.dataURL == null && this.testFileName == null) {
                          this.logError("DataSource: "+this.ID+
                                    ": attempt to use DataSource of type iscServer without SmartClient Server option."+
                                    " Please either set clientOnly: true for one-time fetch against"+
                                    " dataURL/testFileName or upgrade to SmartClient Pro, Power or Enterprise");
                          return;
                      }

          I'd really really really (yes really! :) ) like to be able to trace the Javascript that causes errors like this.

          Code:
          09:35:32.248 [ERROR] [app] 09:35:32.166:XRP6:WARN:Log:TypeError: _2 is null
              DataSource.findByKeys(_1=>{Obj},  _2=>null) @ app/sc/modules/ISC_DataBinding.js:827
              ResultSet.updateCacheData(_1=>[object Array],  _2=>{Obj}) @ app/sc/modules/ISC_DataBinding.js:1446
              ResultSet.updateCache(_1=>"update",  _2=>[object Array],  _3=>{Obj}) @ app/sc/modules/ISC_DataBinding.js:1441
          It seems my only option to do this is use the LGPL version of SmartGWT. This is a shame, since - I presume - that most of the SmartClient code is the same as SmartGWTPro.

          Comment

          Working...
          X