Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User tobinharris's Avatar
    Join Date
    Apr 2008
    Location
    Leeds, UK
    Posts
    34
    Vote Rating
    1
    tobinharris is on a distinguished road

      0  

    Default [FIXED-189] Store 'datachanged' even firing twice

    [FIXED-189] Store 'datachanged' even firing twice


    I have a store declared as:

    PHP Code:
    MyProj.Data.Cards = new Ext.data.Store({
        
    model'Card'    
        
    proxy: new Ext.data.LocalStorageProxy({
             
    id'cards-proxy'
        
    })     
    }); 
    Then I attach a hook to the Store to get notified when it changes.

    PHP Code:
    MyProj.Data.Cards.on('datachanged',function(){alert('it changed');}); 
    Then I load some data in:

    PHP Code:
    MyProj.Data.Cards.loadData(someData); 
    For some reason the datachanged is firing twice. I've looked at the Sencha source and I can't see why this is happening at all.

    In fact, even if I do this I still get the same problem.

    PHP Code:
    MyProj.Data.Cards.suspendEvents();
    MyProj.Data.Cards.loadData(found,false);  
    MyProj.Data.Cards.resumeEvents(); 
    Any help appreciated.

    T
    tobinharris.com
    Leeds, UK
    Co-author of NHibernate in Action
    Likes iPhone, iPad, HTML5, .NET and Ruby on Rails

    Developer and Founder at engineroomapps.com

  2. #2
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    0
    meyerovb is on a distinguished road

      0  

    Default


    This seems like a bug: Ext.data.Store.loadRecords loads the data, executes a call to Ext.data.Store.filter, and then fires the datachanged event. However, the call to the filter method is this.filter(); when it should be this.filter(null, true); in order to suppress the datachanged event from firing in the filter method as well.

  3. #3
    Ext User tobinharris's Avatar
    Join Date
    Apr 2008
    Location
    Leeds, UK
    Posts
    34
    Vote Rating
    1
    tobinharris is on a distinguished road

      0  

    Default


    Thanks!
    tobinharris.com
    Leeds, UK
    Co-author of NHibernate in Action
    Likes iPhone, iPad, HTML5, .NET and Ruby on Rails

    Developer and Founder at engineroomapps.com

  4. #4
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Your issue has been entered in trac, thank you for the report.

  5. #5
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Thanks for the report, this has now been fixed and will be present in the next release.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  6. #6
    Ext User tobinharris's Avatar
    Join Date
    Apr 2008
    Location
    Leeds, UK
    Posts
    34
    Vote Rating
    1
    tobinharris is on a distinguished road

      0  

    Default


    Great, thanks for fixing, and for the feedback
    tobinharris.com
    Leeds, UK
    Co-author of NHibernate in Action
    Likes iPhone, iPad, HTML5, .NET and Ruby on Rails

    Developer and Founder at engineroomapps.com

Similar Threads

  1. Replies: 3
    Last Post: 3 Sep 2010, 6:28 PM
  2. [SOLVED] datachanged event firing twice?
    By mitchellsimoens in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 2 Sep 2010, 11:10 AM
  3. [FIXED-189] Store 'datachanged' even firing twice
    By tobinharris in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 23 Jul 2010, 5:01 AM
  4. Replies: 1
    Last Post: 22 Jul 2010, 5:42 AM

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."