Results 1 to 3 of 3

Thread: Window closing and not removing config

  1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    114
    Answers
    4
    Vote Rating
    0
      0  

    Default Answered: Window closing and not removing config

    Hi guys,

    I have a xtype that extends an extjs window. This xtype has the following in the config:

    Code:
    Ext.define("path",{
        extend: "Ext.window.Window", 
        alias: "widget.myWindow",
       
        config  : {
            width    : 1020,
    
            height     : 600,
    
            modal    : true,
    
           resizable    : false
       },
    
        cards        : []
    When I first create the window the cards are created, and it is populated in the config with some panels.
    e.g.( cards becomes [panel1,panel2,panel3]).

    When I close the window the cards should destroy and become [] right?

    Well when I reopen the window the cards are created again and put into the config. But the cards array from before didn't become empty, and now I have multiple cards.
    e.g.( cards becomes [panel1, panel2, panel3, panel1, panel2, panel3).

    This has been at me for weeks now, would love to get any help.

    Thanks in advance

  2. I usually avoid putting complex types on the prototype. I usually add them from something like initComponent or a method called from initComponent. Then you never have to worry about other instances...

  3. #2
    Sencha Premium User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    605
    Answers
    67
    Vote Rating
    287
      0  

    Default

    I usually avoid putting complex types on the prototype. I usually add them from something like initComponent or a method called from initComponent. Then you never have to worry about other instances...

  4. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    114
    Answers
    4
    Vote Rating
    0
      0  

    Default

    Yes, that did work. Thanks very much for your help.

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
  •