Announcement

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

    Patch for FormItem.isDisabled

    I had to patch this method for some reason. It needed a null check on this.form. See code.

    Code:
    	if (window.isc &&  isc.version.startsWith("v8.2")){
    
    		isc.FormItem.getPrototype().addProperties({
    
    			
    			isDisabled:function() {
    
    				 var _1=this.disabled; 
    				 if(!_1){ 
    					 if( this.parentItem!= null ){
    						 _1=this .parentItem.isDisabled();
    					 }else{ 
    						 //add nullcheck on this.form
    						 if (this.form!= null){
    							 _1= this.form.isDisabled();
    						 } 
    						 if (!_1&& this.containerWidget!= this.form){
    							 _1= this .containerWidget.isDisabled()
    						 }
    				
    					 }
    				 }
    				 return _1
    
    			}
    
    			
    		})
    
    		
    	}

    #2
    Interesting. This implies the method is being called after the form item has been removed from the form (basically once it has been destroyed).
    We'll add the same null check to the codebase (it makes sense to handle this gracefully) but we'd also be interested in seeing how you hit this state.

    If you could show us a runnable test case that demonstrates requiring this we'd be interested in taking a look

    Thanks
    Isomorphic Software

    Comment


      #3
      Hi, unfortunately I can't spend the time to reproduce a runnable test case for this. I can say it happened when I switched a form to edit mode and then switched it back into non-edit mode and then switched to another tab and then the specific error was occuring when I called updateTab() to switch back to the first tab.

      Comment

      Working...
      X