-
22 Nov 2011 12:38 PM #1
Container Cascade method and what it is trying to do?
Container Cascade method and what it is trying to do?
I am having issues with 3.4 and didn't know if anyone else has seen this pop up, haven't been able to find anything searching around.
The container's cascade method is trying to access this.items.items... when is that ever something?
I think it is supposed to be var cs = this.items; but I can't verify this... it is posing an issue when trying to combine a panel with a window, but as an extended form popup class.
This is like what was done in this post long ago, but I can't see why it wouldn't still be a valid way of doing this.
http://northsideofthemoon.net/blog/2009/07/07/making-an-ext-panel-act-as-a-window-part-2/
I understand that this has been a part of the container for quite a while, and if you can explain I guess what it is doing, why and how I can determine the cause of the second items in items being null it would help.
-
22 Nov 2011 12:53 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
this.items is a MixedCollection which itself has an items property that is the actual Array of items so this.items.items is the Array of items.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
22 Nov 2011 12:56 PM #3
That is what I was afraid of I guess... any clue what I might have done or what it might be doing (if I followed the example on that site) when this.items is the array an not the mixed collection.
I am trying to make the popup form more modular, and there in may be the cause of these issues, packaging everything so tightly into one class.
Thank you for the quick response, and explanation of what I was seeing.
-
22 Nov 2011 6:59 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Ext.Panel should automatically turn the items Array you specify into a MixedCollection but won't do this until you call the superclass in the initComponent.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Nov 2011 7:18 AM #5
Thank you for your help. It appears that the tutorial from long ago on northside was miss ordered..
when I called superclass.initComponent before the creation of the parent window it worked as expected.
above is the new code snippet of just that section for reference.Code:this.addEvents ( { votedPopup: true }, { votedPanel: true } ); nside.blogcode.PopupPanel.superclass.initComponent.apply(this, arguments); if (this.popup) { this.m_window = new Ext.Window( { closable: true, layout: "fit", title: "Poll Question", items: [this], height: 250, width: 320, closeAction: "hide" }); this.on("hide", function() { this.m_window.hide();}); }


Reply With Quote