PDA

View Full Version : Upgrade extjs 4.1.2 to 4.1.3 problem



hurdes
5 Nov 2012, 9:37 AM
Hello, my application works on extjs 4.1.2. When I`m upgrade extjs to 4.1.3 (extjs i have in external war archive), my application not load and running. In console are only one error message "store is undefined". Its any bug in version 4.1.3?

error traced on row 33133 in ext-all-debug.js
bindStoreListeners: function(store) {
var me = this,
listeners = Ext.apply({}, me.getStoreListeners(store));

if (!listeners.scope) {
listeners.scope = me;
}
me.storeListeners = listeners;
store.on(listeners);
},

stack trace is

bindStoreListeners()ext-all-debug.js (řádek 33133)store = undefined


bindStore()ext-all-debug.js (řádek 33102)store = undefined
initial = true



initComponent()ext-all-debug.js (řádek 91932)
constructor()ext-all-debug.js (řádek 22179)config = Object { allowBlank=false, editable=false, displayField="label", více...}



callParent()ext-all-debug.js (řádek 3939)args = [Object { allowBlank=false, editable=false, displayField="label", více...}]



constructor()ext-all-debug.js (řádek 28553)config = Object { allowBlank=false, editable=false, displayField="label", více...}



constructor ()ext-all-debug.js (řádek 4562)
(?)()2 (řádek -21210)c = constructor()
a = [Object { allowBlank=false, editable=false, displayField="label", více...}]



instantiate()ext-all-debug.js (řádek 5148)
alias()ext-all-debug.js (řádek 1914)
PropertyGridPanel.js?_dc=1352136692592()Proper...6692592 (řádek 36)

and my code segment is

Ext.define('Aves.view.override.PropertyGridPanel', {
override: 'Aves.view.PropertyGridPanel',

initComponent: function() {
var me = this;
me.callParent(arguments);

var valueColumn = Ext.getCmp('prop_edit_properties_value_column');
valueColumn.getEditor = Ext.Function.bind(me.getCellEditor, me);
},

textValueEditor: Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.Text', {
selectOnFocus: true,
allowBlank: true
})
}),

passwordValueEditor: Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.Text', {
selectOnFocus: true,
allowBlank: true,
inputType: 'password'
})
}),

numberValueEditor: Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.Number', {
selectOnFocus: true,
allowBlank: true,
allowDecimals: false
})
}),

booleanValueEditor: Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.ComboBox', { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR

allowBlank: false,
editable: false,
displayField: 'label',
queryMode: 'local',
store: 'PropertyBooleanListStore',
valueField: 'id'
})
}),

nullableBooleanValueEditor: Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.ComboBox', {
allowBlank: true,
editable: false,


In previous version all work fine. Thanks. Jaroslav Hurdes

mitchellsimoens
7 Nov 2012, 8:26 AM
Why are you overriding your own class?

hurdes
7 Nov 2012, 8:43 AM
Hi, Im override my class because use Sencha Architect for generate application and extended functionality write in overrided class. What's the problem with override classes? In version 4.1.2 everything is fine.

mitchellsimoens
7 Nov 2012, 8:48 AM
It's a waste of performance to override your own class but since you are within Architect that's your only choice

mpasacrita@escholar.com
7 Nov 2012, 8:49 AM
I'm also having this problem, both with the commercially released version of 4.1.3, and the nightly build.

My app works fine with 4.1.1, and I have followed various suggestions from the forum:

1) Turn off auto loading of Stores
2) storeIDs already matched class names
3) I'm not overriding any classes at all.
4) I'm not using any local storage proxies

What could be the problem? Many people seem to be having it.

mpasacrita@escholar.com
21 Nov 2012, 8:11 AM
Hello? 2 weeks later, still no response to this?

jbender11
9 Mar 2013, 12:36 PM
I too am having this problem with Architect. My app was working fine then suddenly I started getting the "store is undefined" in the bindStoreListeners function. My store has autoLoad: true but turning that off seems to make no difference. It's as if the store js file is not being loaded at all. Appears to be an Architect bug but not sure.

Any Sencha comments? I've already spent 2 days trying everything I can think of. Almost makes we want to abandon Architect, but I have invested a significant amount of time in it.

jbender11
10 Mar 2013, 8:19 AM
Here's an example of the problem if anyone has any ideas.

John

aconran
11 Mar 2013, 8:29 AM
Here's an example of the problem if anyone has any ideas.

John

Thanks for the project, we will take a look.

honestbleeps
11 Mar 2013, 8:54 AM
I'm currently looking at this for you. In order to fully test the equivalent of what you have, can you send me a sample of what data/languages.json might return in your project?

Thanks

jbender11
11 Mar 2013, 9:16 AM
Sorry, I didn't realize that it wasn't included in the archive. Here's a more complete version with images/js/data folders.

I tried to attach my .war file but it was too big. (Running under Tomcat).

Just in case, the languages.json file looks like this:


[
["en", "English"],
["es", "Español"],
["fr", "Français"],
["de", "Deutsch"],
["it", "Italiano"],
["ch", "中文 (中国)"]
]

honestbleeps
11 Mar 2013, 9:26 AM
one more request - I've taken the liberty of making a stub json data file that is simple enough (you only have 2 fields, so no worries there) - but I can't seem to get your project going even with ExtJS 4.1.1 ...

Can you go into your prior versions / version control system and get me a version that works in 4.1.1 so that I can try the upgrade process and see where things might be going wrong?

Thanks much - looking forward to finding you a solution!

jbender11
11 Mar 2013, 10:03 AM
Here's an archive from subversion that was committed on Jan., 29, 2013. I know this one works in 4.1.1 since it is currently working in our test environment.

This is the complete project so hopefully everything is included that's needed to run.

I'm not sure when I switched to 4.1.3 but it was sometime this year, either Jan or early Feb.

Let me know if you need anything else. I try to keep all the external files in the Sencha Projects folder but I might be missing one or two.

The Temp project that I submitted earlier started with the full project and I chopped out all the other views/stores/models that weren't needed to show the problem. This copy has them all included.

Unfortunately when I tried to upload the subversion, I think I hit the file size limit. It's 1.9 MB. Can I email it or ftp it somewhere?


Thanks for your help,

John
jbender11@yahoo.com

honestbleeps
11 Mar 2013, 10:07 AM
Sorry about the size limit - please send it to architect.feedback@sencha.com and I'll have a look right away, thanks!

jbender11
11 Mar 2013, 10:23 AM
Just sent a copy to architect.feedback@sencha.com.

Thanks!

John

jbender11
11 Mar 2013, 6:29 PM
So the end result (at least for my situation) is that I set some of my views to be Singletons, at the same time I upgraded to 4.1.3. It turns out that if you have a view that is a Singleton, you can not have a widget in that view that has a store associated with it. So in my case, I had a login screen with a combo box that had a store for user language selection. I don't completely understand what the order of operations is, but apparently at run-time, Singletons are initialize BRFORE stores are loaded and available. This seems like a design flaw but I'm not 100% sure of that. (Architect dev team comments welcome here...)

So to get around the immediate problem, don't use Singletons for views with embedded stores in 4.1.3. Not sure if this even applies to the original problem reported in this thread but hope this helps someone.

To open a Singleton:
app.view.myWindow.show();

To open a non-singleton:
Ext.create('app.view.myWindow').show();

John

aconran
11 Mar 2013, 8:10 PM
John -

Glad that we were able to figure out what the issue was.

Basically singleton: true is a flag at the class level. It will auto-instantiate the class at definition time. The application must load all classes and then run the launch method.

Architect should probably remove the singleton flag from all views/stores/models/etc. Typically the singleton: true flag is used on utility classes or things that are always around.

For example Ext.Ajax or Manager's, etc