Announcement

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

    [BUG] FileItem.redraw() throws exception: "_recreateCanvas" is not a function

    Hi,
    I've noticed a bug then tried to set FileItem property 'canEdit' to false and force redraw() on that item. From sources it looks like "_recreateCanvas" function was made public, but missed to change names in usage site.

    Bbug was found on 11.0 and 11.1 tested on latest builds.

    Here is asnippet of code @ FileItem.js:

    Code:
        redraw : function () {
            var isReadOnly = this.isReadOnly();
            // This occurs when changing the state of canEdit.
            if (this._isReadOnly != isReadOnly) {
                this._recreateCanvas();  // <- function not found
            } else if (this.canvas && !isReadOnly) {
    
                // if this.multiple is different from the "multiple" setting on the item in the
                // canvas DynamicForm, recreate the form...
                var item = this.editForm.getItem(0);
                if (this.multiple != item.multiple) {
                    item == null;
                    this._recreateCanvas(); // <-- function not found.
                }
            }
            this.Super("redraw", arguments);
        },
    
        recreateCanvas : function () { // <-- looks like it's corrent name, not "_recreateCanvas"
          ///....
       }

    #2
    Fast workaround fix for this problem:
    Code:
     
     isc.[I]FileItem[/I].addProperties({_recreateCanvas: isc.[I]FileItem[/I].getPrototype()['recreateCanvas']});

    Comment


      #3
      We have fixed this issue in our codebase, you'll find the fix applied to SC 11.1d and 11.0p on next nightly build.
      Thank you very much for reporting.

      Best,
      Isomorphic

      Comment

      Working...
      X