Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    64
    Vote Rating
    0
    jeroenvduffelen is on a distinguished road

      0  

    Exclamation [CLOSED] Model instance get's parent Store as object after inserting

    [CLOSED] Model instance get's parent Store as object after inserting


    Setting up a simple Store, creating a Model instance and than inserting that instance to the Store:

    Code:
    		this.state.bookActiveChapters = new Ext.data.JsonStore({
    			autoLoad: false,
    			model: 'chapter',
    			storeId: 'activeChapters',
    		});
    		var emptyChapter = Ext.ModelMgr.create({
    			"id": "emptyChapter",
    			"next": 'none',
    			"prev": 'none',
    			"title": "No chapters loaded...",
    			"content": "Load chapters first."
    		}, 'book');
    		this.state.bookActiveChapters.insert(0, emptyChapter);
    Results in a Model with the parent Store inside it...
    model_store.png
    Attached Images

  2. #2
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    @ jeroenvduffelen --

    What you are seeing in the debugger is a simple reference to the owning store created when the Model instance is inserted into the store.

    It is not a copy of the store, but a simple reference.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


Similar Threads

  1. [FIXED-114] Creating new instance of Model results in "dirty" object
    By jeroenvduffelen in forum Sencha Touch 1.x: Bugs
    Replies: 8
    Last Post: 23 Feb 2011, 6:05 PM
  2. Transfer widget values to model instance - conceptual question
    By TheBerliner in forum Ext 3.x: Help & Discussion
    Replies: 15
    Last Post: 21 Nov 2009, 10:51 PM
  3. Object reference not set to an instance of an object
    By johnjalani in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Jan 2009, 8:33 AM

Thread Participants: 1