PDA

View Full Version : Ext 4.2.1 Ext.Loader generate wrong path for diff app names



Rinword
3 Feb 2017, 3:46 AM
Hi all! We have noticed some strange behaviour of Ext.Loader. We're using Ext [version.name (https://vk.com/away.php?utf=1&to=http%3A%2F%2Fversion.name)=ext-4.2.1.883].

We created 2 apps with usually sencha generate app:

1. sencha -sdk /pathToSdk generate app MyApp /pathToMyApp.
2. sencha -sdk /pathToSdk generate app SP /pathToSP.

For example SP:

app.js

Ext.application({
name: 'SP',
extend: 'SP.Application',
autoCreateViewport: true
});


app/Application.js

Ext.define('SP.Application', {
name: 'SP',
extend: 'Ext.app.Application',

requires: [
'Ext.container.Viewport',
'Ext.tree.*',
'Ext.grid.*',
// 'SP.entities.os.view.Panel'

],

views: [
// 'SP.entities.os.view.Panel'
]
});


app/view/Viewport.js


Ext.define('SP.view.Viewport', {
extend: 'Ext.container.Viewport',
requires:[
'Ext.layout.container.Fit',
'SP.entities.os.view.Panel'
],

layout: {
type: 'fit'
},

views: [
// 'SP.entities.os.view.Panel',
],
items: [{
xtype: 'app-main'
}]
});

After, created the similar structure for each:

app/entities/os/view/Panel.js


Ext.define('SP.entities.os.view.Panel', {
// extend: 'SP.ux.panel.Panel',
extend: 'Ext.panel.Panel',
requires:[
'Ext.tab.Panel',
'Ext.layout.container.Border',
//'SP.entities.os.controller.Controller',
//'SP.entities.os.view.Grid',
//'SP.entities.os.view.Form'
],
//controller: 'SP.entities.os.controller.Controller',
xtype: 'app-main',
// alias: 'widget.app-main',
layout: 'hbox',
cls: 'os-panel',
// items: [
//
// ]
});

Do sencha app build + sencha web start and have two different paths to Panel.js:
In case MyApp is all right:
55875

In case SP failed, it's lost /entities/ level after app/:
55874

DevTools browser log:
55876

I'm not sure that it's a bug, but we've lost 2 hours trying to solve this problem and still can't solve it. Thanks in advance for your answers!