Results 1 to 4 of 4

Thread: ViewModel tries to update bound data on a destroyed object

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Location
    Guildford, United Kingdom
    Posts
    11
    Vote Rating
    5
      2  

    Default ViewModel tries to update bound data on a destroyed object

    Ext version tested:
    • Ext 6.0.1.250
    Browser versions tested against:
    • Chrome 47
    • IE8
    • FF 43.0.1
    • Safari 9
    DOCTYPE tested against:
    • HTML5
    Description:
    • When fields' config are bound to data or a formula (i.e. read-only, disabled etc), and the value of the data, or return value of the formula change after a form with these fields has been displayed AND then destroyed, you receive either a Cannot read property 'addCls/removeCls' or null error message, and any further layout changes fail.
    Steps to reproduce the problem:
    • See the attached Fiddle https://fiddle.sencha.com/#fiddle/138r
    • Edit an assessment (Will's Assessment)
    • Close the form
    • Edit another assessment for a different Assessor (Jace's Assessment)
    • Check console for error message (this works no matter which Assessment you choose first as long as the Assessor is different)
    The result that was expected:
    • The bind doesn't call onBindNotify and run the setReadOnly or setDisabled function for the destroyed form component.
    • The new form component gets displayed with the current correct bindings.
    The result that occurs instead:
    • The bind generates an error message.
    • Further layouts fail (mainly you can't reopen the edit window)

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,099
    Vote Rating
    969
      2  

    Default

    Thanks for the post. This issue has already been resolved in the latest nightlies for the next release. The issue had to do with cleaning up bindings correctly when a child component was destroyed.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Location
    Guildford, United Kingdom
    Posts
    11
    Vote Rating
    5
      0  

    Default

    Sweet! Thanks for the quick reply

  4. #4

    Default

    Quote Originally Posted by evant View Post
    Thanks for the post. This issue has already been resolved in the latest nightlies for the next release. The issue had to do with cleaning up bindings correctly when a child component was destroyed.
    Is there any workaround for 6.0.1.250? I am sticking to this version because I don't want to change version at the stage of development I am :S
    '?
    (Is it solved at 6.2.0 GPL? - sorry lazy me. I confirm it is solved at 6.2.0.589 at fiddle - Is there a workaround at 6.0.1.250?)

    Thanks!!

Similar Threads

  1. Replies: 1
    Last Post: 10 Mar 2015, 1:04 PM
  2. GridView - Bound to ViewModel - Add new record
    By umpatel in forum Ext 5: Q&A
    Replies: 5
    Last Post: 9 Oct 2014, 7:05 AM
  3. [CLOSED] [closed]ViewModel / Chart / bound store / 5.0.1.1131
    By t.nissen in forum Ext 5: Bugs
    Replies: 1
    Last Post: 17 Jul 2014, 12:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •