1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    186
    Vote Rating
    0
    Nullity is on a distinguished road

      0  

    Default getChildrenByClassName missing in Ext 1.0?

    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?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    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.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    186
    Vote Rating
    0
    Nullity is on a distinguished road

      0  

    Default


    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.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    9
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    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.
    So enjoy!

Similar Threads

  1. missing images in documentaion
    By snod0g in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Mar 2007, 9:31 AM
  2. What is faster than getChildrenByClassName(..)[0] ?
    By seldon in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 3 Jan 2007, 6:33 PM
  3. json.php missing in yui-ext 0.33
    By eddyyanto in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 23 Dec 2006, 8:41 AM
  4. getChildrenByClassName
    By glauff in forum Ext 1.x: Bugs
    Replies: 3
    Last Post: 10 Nov 2006, 6:46 AM
  5. I must be missing something.
    By Animal in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 12 Sep 2006, 11:51 AM

Thread Participants: 2