jurrie
24 Oct 2011, 11:34 PM
The following code worked fine in Touch 1.1 and should work according to the 2.0 docs:
Ext.select('.myClassName');
When I try this in 2pr1, a new CompositeElementLite is created (line 43721 of sencha-touch-all-debug-w-comments.js) which calls
new Ext.dom.Element();
The constructor of Element, however, seems to expect to be passed an element or id. In this case, the argument is undefined which generetes an error (line 42941):
constructor: function(dom) {
if (typeof dom == 'string') {
dom = document.getElementById(dom);
}
if (!dom) {
throw new Error("Invalid domNode reference or an id of an existing domNode: " + dom);
}
this.dom = dom;
this.getUniqueId();
}
Calling the (undocumented) method Ext.dom.Element.selectorFunction() (which is called by Ext.dom.Element.select) does return my HTML node (though as an HTMLElement; less useful than what Touch 1.1 returned with Ext.select).
Ext.select('.myClassName');
When I try this in 2pr1, a new CompositeElementLite is created (line 43721 of sencha-touch-all-debug-w-comments.js) which calls
new Ext.dom.Element();
The constructor of Element, however, seems to expect to be passed an element or id. In this case, the argument is undefined which generetes an error (line 42941):
constructor: function(dom) {
if (typeof dom == 'string') {
dom = document.getElementById(dom);
}
if (!dom) {
throw new Error("Invalid domNode reference or an id of an existing domNode: " + dom);
}
this.dom = dom;
this.getUniqueId();
}
Calling the (undocumented) method Ext.dom.Element.selectorFunction() (which is called by Ext.dom.Element.select) does return my HTML node (though as an HTMLElement; less useful than what Touch 1.1 returned with Ext.select).