-
13 Oct 2012 12:53 PM #1
2.1.0 RC1 - using "layout: 'fit'" causes errors.
2.1.0 RC1 - using "layout: 'fit'" causes errors.
Specifying items with a simple "layout: 'fit'" configuration throws "
Uncaught TypeError: Object fit has no method 'onItemAdd'" with the following stacktraceScreen shot 2012-10-13 at 1.53.06 PM.png
-
14 Oct 2012 2:22 PM #2
Example of failing view
Code:items: [ { xtype: 'tabpanel', flex: 2, cls: 'stretch', layout: { animation: false }, tabBar: { layout: { type: 'hbox', pack: 'stretch', align: 'stretch' }, ui: 'purple' }, items: [ { itemId: 'openProjectsContainer', title: 'Open', layout: 'fit', items: [ { xtype: 'extendedlist', plugins: [{ xclass: 'Ext.plugin.PullRefresh' }], store: null, // set in controller itemTpl: '{name}', loadingText: 'Loading Projects', grouped: true } ] }, { itemId: 'archivedProjectsContainer', title: 'Archived', layout: 'fit', items: [ { xtype: 'extendedlist', plugins: [{ xclass: 'Ext.plugin.PullRefresh' }], store: null, // set in controller itemTpl: '{name}', loadingText: 'Loading Projects', grouped: true } ] } ] } ]
-
15 Oct 2012 4:59 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
This test is working for me in RC1 and RC2:
Code:Ext.Viewport.add({ layout : 'fit', items : { xtype : 'tabpanel', items : [ { title : 'Open', layout : 'fit', items : [ { html : 'Hello' } ] } ] } });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.
-
15 Oct 2012 8:01 AM #4
You're right Mitchell. Turns out I had a 'layout: fit' outside of a config block in a view class - which was causing the error. There was no warning of deprecation just that error.
Hopefully this helps someone else.
-
17 Nov 2012 9:49 PM #5
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote