Announcement

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

    Patch needed for headerButtonDefaults

    Hello,

    We see an issue in the latest 8.3 nightly that we also saw in 8.2. Here is the stacktrace:

    Code:
    12:14:42.271:TMR7:WARN:Log:TypeError: Cannot call method '$60z' of null
    Stack from error.stack:
        isc.A.headerButtonDefaults.getCurrentCursor()
        Canvas.getTagStart()
        Canvas._insertHTML()
        Canvas.draw()
        StatefulCanvas.draw()
        ListGrid.updateSorter()
        [c]Class.fireCallback()
        Timer._fireTimeout()
        <anonymous>:1:11() @
    We tried to write a patch to do a null check on _1 but can't figure out how to apply the patch properly so it is getting ignored. Can you help? Here is what we tried:

    Code:
    	isc.ListGrid.getPrototype().addProperties({
    
    		
    		headerButtonDefaults:{
    			getCurrentCursor:function(){
    				isc.Log.logInfo("inside current cursor patch");
    				var _1=this.parentElement?this.parentElement.grid:null;var _2;
    				if(_1&&this.masterIndex!=null){
    					var _3=_1.getField(this.masterIndex),_4=_1.$66c(_3)!=false;if(_4)_2=isc.Canvas.HAND;else _2=isc.Canvas.DEFAULT
    				}else{
    				if(this.isSorterButton){
    					if(!_1&&isc.isA.ListGrid(this.parentElement))_1=this.parentElement;
    					if(_1!=null){
    						var _4=_1.$66c(_1.$60z())!=false;
    						if(_4)_2=isc.Canvas.HAND;else _2=isc.Canvas.DEFAULT
    						
    					}
    				}else{
    					_2=this.getClass().getPrototype().cursor}
    				}
    				this.cursor=_2;return this.Super("getCurrentCursor",arguments)
    			},
    			dragScrollType:"parentsOnly",minWidth:20}
    })

    #2
    We'll fix this in the builds today - in the meantime, just removing the getPrototype() bit from your addProperties() call should install your patch properly

    Comment


      #3
      Thanks, trying to add that patch without getPrototype corrupted the style of my grid headers though. So, I guess I can just try with your next build unless you have a quick answer on why that happened.

      Comment


        #4
        Ah yes - you need to use changeDefaults() rather than addProperties() - the doc explains why

        Comment


          #5
          Thanks. Using changeDefaults did the trick. I did get a buch of warnings like this after the null pointer was bypassed. This is a user interaction where grids are getting destroyed and rebuilt in response to user clicks.

          Code:
          13:09:50.661:TMR5:WARN:StretchImgButton:sectorGrid_sorter:Attempt to access destroyed widget in the DOM - destroy() called at invalid time (eg: mid-draw) or invalid method called on destroy()d widget. Stack Trace:
              [a]MathFunction.getStackTrace(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
              Canvas.getHandle()
              Canvas.$qy()
              Canvas.adjustOverflow(_1=>"draw", _2=>undef, _3=>undef)
              Canvas.$qa()
              Canvas.draw(_1=>undef, undef, undef)
              StatefulCanvas.draw(_1=>undef, _2=>undef, _3=>undef)
              ListGrid.updateSorter()
              [c]Class.fireCallback(_1=>Obj, _2=>undef, _3=>Array[0], _4=>[ATListGrid ID:sectorGrid], _5=>true) on [Class Timer]
              [c]Timer.$in(_1=>"$ir804")
          
          13:09:50.667:TMR5:WARN:StretchImgButton:sectorGrid_sorter:Attempt to access destroyed widget in the DOM - destroy() called at invalid time (eg: mid-draw) or invalid method called on destroy()d widget. Stack Trace:
              [a]MathFunction.getStackTrace(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
              Canvas.getHandle()
              Canvas.$ux(_1=>"draw")
              Canvas.$ut(_1=>"draw")
              Canvas.adjustOverflow(_1=>"draw", _2=>undef, _3=>undef)
              Canvas.$qa()
              Canvas.draw(_1=>undef, undef, undef)
              StatefulCanvas.draw(_1=>undef, _2=>undef, _3=>undef)
              ListGrid.updateSorter()
              [c]Class.fireCallback(_1=>Obj, _2=>undef, _3=>Array[0], _4=>[ATListGrid ID:sectorGrid], _5=>true) on [Class Timer]
              [c]Timer.$in(_1=>"$ir804")
          
          13:09:50.674:TMR5:WARN:clickMask:showClickMask - attempting to remove invalid object :StretchImgButton{creator: [ATListGrid ID:sectorGrid],
          isSorterButton: true,
          canFocus: false,
          capSize: 5,
          labelHPad: 4,
          src: "[SKIN]ListGrid/header.gif",
          dragScrollType: "parentsOnly",
          minWidth: 20,
          titleStyle: "headerTitle",
          baseStyle: "headerButton",
          wrap: true,
          hoverDelay: 1600,
          hoverWidth: 400,
          hoverHeight: 100,
          hoverAlign: "left",
          hoverVAlign: "center",
          ID: "sectorGrid_sorter",
          width: 16,
          height: 42,
          backgroundColor: "#CCCCCC",
          position: "absolute",
          className: "headerButton",
          left: 1002,
          styleName: "headerButton",
          label: [Label ID:sectorGrid_sorter_label],
          zIndex: 205004,
          redrawOnResize: false,
          cacheOffsetCoords: true,
          cursor: undef,
          destroying: true,
          destroyed: true} from tab order

          Comment


            #6
            We've fixed those too for tomorrow's builds, all versions 8.2 and onward

            Comment

            Working...
            X