7 Mar 2007 10:43 AM #1
getChildrenByClassName missing in Ext 1.0?
It seems as though the functions 'getChildrenByClassName()' and 'getChildrenByTagName()' have been removed in Ext 1.0. Was this intentional, and if so, have they been replaced by something else?
For the time being, I prototyped them back in to do what I need to do, but i was just curious why they were removed.
EDIT: I see now that it is still in 'ext-back-compat.js', but why was it removed from the core Element class?
7 Mar 2007 11:20 AM #2
Those functions were mainly wrappers around YUI functionality to do that. In 1.0, that kind of selection is done via the Element.select method which uses DomQuery under the covers to find things via CSS/Xpath - it's much more powerful and faster than the old methods. See the blog post on DomQuery for examples.
7 Mar 2007 12:18 PM #3
Up until this point, I never bothered to read up on DomQuery, as I didn't think it was anything I would be using - wow, was I wrong. I had no idea exactly what it was for and how powerful it was until looked into it after your reply. I just used it to do what I needed in 2 lines of code instead of the 20 or so lines used to re-impliment getChildrenByClassName() and a for loop.
Thanks for your help, and thank you Jack for DomQuery and Ext. It's great.
7 Mar 2007 12:24 PM #4
Well glad you found out that you do need DomQuery, cause I think DomQuery is one of the most powerful tools in Ext and is the foundation you need if you want to use Ext to the fullest.
You are about to find out a lot more about Ext now you looked into DomQuery.
By snod0g in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 22 Mar 2007, 9:31 AM
By seldon in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 3 Jan 2007, 6:33 PM
By eddyyanto in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 23 Dec 2006, 8:41 AM
By glauff in forum Ext 1.x: BugsReplies: 3Last Post: 10 Nov 2006, 6:46 AM
By Animal in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 12 Sep 2006, 11:51 AM