-
18 Jan 2011 11:19 AM #1
[DEFER] Component xtype not registered in exported js file
[DEFER] Component xtype not registered in exported js file
I created a window into which I inserted a ListView & DataView. After configuration, I performed "Promote To Class" and changed the jsClass & userXType settings for both. I then exported the project and opened the result in a browser, receiving the following error:
Error: types[config.xtype || defaultType] is not a constructor
Source File: http://extjs.cachefly.net/ext-3.2.1/ext-all-debug.js
Line: 9553
I discovered that the xtype was being registered for the ListView:
but not for the DataView:Code:CategoryListView = Ext.extend(CategoryListViewUi, { initComponent: function() { CategoryListView.superclass.initComponent.call(this); } }); Ext.reg('categorylistview', CategoryListView);
I tried deleting the DataView and recreating but received the same results.Code:BookDataView = Ext.extend(BookDataViewUi, { initComponent: function() { BookDataView.superclass.initComponent.call(this); } });
I've attached all relevant files.
-
18 Jan 2011 11:44 AM #2Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
Hi WBX,
Because the xtype is registered in the .js file, and the .js is not overwritten if it already exists (so any implementation code is not lost), any userXType changes are not seen between one export and another. You will need to either add the xtype registration manually, or delete your .js file for BookDataView (given that you don't have any implementation code in there yet). So in short, you had exported a BookDataView class once before, prior to adding an userXType.
Hope that helps.
-
18 Jan 2011 11:45 AM #3Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
Also want to mention that we're going to come up with a clean solution to this.
-
18 Jan 2011 12:15 PM #4
-
18 Jan 2011 12:35 PM #5
On a related note, prior to performing "Promote To Class", I set the id of the child components and this was reflected in the component hierarchy (i.e. displays as categoryListView instead of MyListView). After performing "Promote To Class", the component hierarchy display changed back to MyListView (the jsClass setting) and the userXType was set to mylistview.
As part of the clean solution being worked, I suggest using the id (if set) to create the jsClass and userXType settings in order to maintain some consistency.
-
18 Jan 2011 12:43 PM #6Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 5
Thanks for the suggestion, that makes sense.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
cls.xtype undefined on Ext.reg('component', Ext.Component) when run over HTTP
By saprot in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 13 Apr 2011, 12:48 AM -
Check if certain xtype exists/ is registered
By michiel in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 9 Mar 2010, 11:20 AM -
New xtype registered, but getting error on render
By aacraig in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 28 May 2008, 3:23 AM -
Refreshing grid registered as xtype
By johnstontrav in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 27 May 2008, 3:11 PM


Reply With Quote