PDA

View Full Version : [CLOSED] [2.2 Trunk] Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: layout.row



michaeld
Jun 10, 2013, 11:04 PM
I am trying to provide the code that produces this effect but it's related to rowlayout it looks like.

michaeld
Jun 11, 2013, 12:19 AM
Here is where it traps:


instantiateByAlias: function() {
var alias = arguments[0],
args = arraySlice.call(arguments),
className = this.getNameByAlias(alias);// <= this returns null and it shouldn't, alias is 'layout.row'


if (!className) {
className = this.maps.aliasToName[alias];


if (!className) {
throw new Error("[Ext.createByAlias] Cannot create an instance of unrecognized alias: " + alias);//<= exceptions here
}


if (global.console) {
global.console.warn("[Ext.Loader] Synchronously loading '" + className + "'; consider adding " +
"Ext.require('" + alias + "') above Ext.onReady");
}


Ext.syncRequire(className);
}


args[0] = className;


return this.instantiate.apply(this, args);
},

Baidaly
Jun 11, 2013, 1:10 AM
Hello!


I am trying to provide the code that produces this effect but it's related to rowlayout it looks like.

Sorry, you say you have this issue with RowLayout but we don't have RowLayout in Ext.NET 2.x. We have it in Ext.NET 1.x. Did I misunderstand you?

michaeld
Jun 11, 2013, 1:17 AM
Ahh, that would explain it then.

Baidaly
Jun 11, 2013, 1:51 AM
Ahh, that would explain it then.

You can use VBoxLayout instead of RowLayout: http://examples2.ext.net/#/Layout/VBoxLayout/Rows/

michaeld
Jun 11, 2013, 4:17 AM
I have been. Not all of my code has been converted 100% from 1.0 but I wasn't aware RowLayout was gone since ColumnLayout is still there. But I get it now.

michaeld
Jun 11, 2013, 4:21 AM
However, though minor, there's more here to this issue. The extjs code still managed to convert RowLayout to layout.row. I'm assuming that comes from the legacy code from 1.0 or extjs 3.x. I'm not saying this needs to be fixed but it could save someone converting if it didn't do that. Layouts should match a select list.

Daniil
Jun 11, 2013, 5:54 AM
but I wasn't aware RowLayout was gone

Please note that there is the item #127 for this in BREAKING_CHANGES.txt.
http://examples2.ext.net/#/Getting_Started/Release_Documents/BREAKING_CHANGES/


However, though minor, there's more here to this issue. The extjs code still managed to convert RowLayout to layout.row. I'm assuming that comes from the legacy code from 1.0 or extjs 3.x. I'm not saying this needs to be fixed but it could save someone converting if it didn't do that. Layouts should match a select list.

Just a Container's Layout property supports a custom layout to be set up.

<ext:Container runat="server" Layout="CustomLayout" />