multivan
30 Nov 2010, 10:48 AM
I get an error after selecting an item of a list "TypeError: Result of expression 'o' [undefined] is not an object (sencha-touch-debug-w-comments.js), when the store is refreshed by a JSONP-request. The error occurs, after the messagebox is quittet with ok. After that, the item is not selected.
When I populate the store directly, everything s ok and the item is selected.
What is my mistake?
I have a model:
Ext.regModel('Direction', {
fields: ['shade_depth', 'shade_direction']
});
a store:
var store = new Ext.data.JsonStore({
model: 'Direction'
});
the refresh-function:
var refresh = function() {
Ext.util.JSONP.request({
url: 'getDirection.php',
params: {InitColor:param_InitHair},
callbackKey: 'callback',
callback: function(data) {
data = data.results;
DirectionList.update(data);
}
});
};
an the Ext.List:
DirectionList = new Ext.List(
{
itemTpl: '{shade_depth}',
store: store
});
DirectionList.addListener('itemtap', function () {alert('tap');});
When I populate the store directly, everything s ok and the item is selected.
What is my mistake?
I have a model:
Ext.regModel('Direction', {
fields: ['shade_depth', 'shade_direction']
});
a store:
var store = new Ext.data.JsonStore({
model: 'Direction'
});
the refresh-function:
var refresh = function() {
Ext.util.JSONP.request({
url: 'getDirection.php',
params: {InitColor:param_InitHair},
callbackKey: 'callback',
callback: function(data) {
data = data.results;
DirectionList.update(data);
}
});
};
an the Ext.List:
DirectionList = new Ext.List(
{
itemTpl: '{shade_depth}',
store: store
});
DirectionList.addListener('itemtap', function () {alert('tap');});