1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default [2.??] Record.commit()

    [2.??] Record.commit()


    Record.commit() does not take into account if Record has already been commited,so you can get "double" commit,that not desirable in some circumstences.That looks really odd if you remember how careful "change" event handled for TextField and alike(value checked if it's really modified before firing "change").

    Thanks.

  2. #2
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    a commit is a commit. what do you mean by "double commits"?
    (i'm thinking along the lines of database commits here.)

    could you post some demo code to better explain your situation?

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    228
    Vote Rating
    4
    XASD is on a distinguished road

      0  

    Default


    a commit is a commit
    exactly-I could not make commit second time.
    Code of commit method for Record:
    Code:
            this.dirty = false;
            delete this.modified;
            this.editing = false;
            if(this.store && silent !== true){
                this.store.afterCommit(this);
            }
    all this code execute EVERYTIME I call commit(),particularly
    Code:
     this.store.afterCommit(this);
    that makes false assertion,if commit was done earlier.

    Thanks.

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,116
    Vote Rating
    507
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This isn't a bug, if you're explicitly calling commit on the record then that's what it will do.

    If your issue is the afterCommit being called, you can always have it commit silently.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar