Hybrid View
-
16 Dec 2011 7:55 AM #1
Error: namespace is undefined
Error: namespace is undefined
Designer version tested:- Designer 1.2.2 Build 48
- Windows 7
- Ext JS 4.x
- When I link a class into another class I get "namespace undefined" error
- Create a form panel
- Create a window
- Link panel into the window
- Export your code and execute your application
- the window showing with the inner panel
- javascript error: namespace is undefined
- insert alias property into the ui class with magic word 'widget'
Code:Ext.define('MyApp.view.ui.MyForm', { extend: 'Ext.form.Panel', alias: 'widget.myform', .....
-
20 Dec 2011 11:41 AM #2
I tried what you suggested and it did produce alias: widget.myform but it did so in MyApp.view.MyForm and not the base class
Code:Ext.define('MyApp.view.MyForm', { extend: 'MyApp.view.ui.MyForm', alias: 'widget.myform', initComponent: function() { var me = this; me.callParent(arguments); } });Last edited by Phil.Strong; 20 Dec 2011 at 11:41 AM. Reason: typo
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
Known Bugs in Architect Latest
-
21 Dec 2011 7:59 AM #3
Ok Phil,
but what appen if you have exported code before linking? external ui files are not re-generated by designer, if I link after first export I loose the alias property.
-
22 Dec 2011 1:32 PM #4
A fair point
A fair point
I was scratching my head earlier thinking why did we put alias in the super class and not the base class. I think it should be moved to the base class.
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
Known Bugs in Architect Latest
-
22 Dec 2011 1:39 PM #5
Ok!
Can't wait for Sencha Designer 2! Good work!
-
5 Mar 2012 1:14 PM #6
This is a bug by design/or flaw in the code generation approach of Designer 1.x.
Designer 2.x we are now taking the approach of using a single class with overrides. Therefore this issue never occurs:
http://www.sencha.com/forum/showthre...g-Build-gt-298Aaron Conran
@aconran
Sencha Architect Development Team
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote