Hi Jim,

I see your point, but when I am dealing with similar problems, I just 
insert a small fragment of code testing the existence of a method:

if ( ! object.getChildren){
   // object has no children
}

or, more correctly,

if ( typeof object.getChildren != "function" ){
    // object has no children
}

Why would this be more onerous than

if ( object.getChildren() == false ) {
    // object has no children
}

Cheers, Christian

Jim Hunter schrieb:
> Every control that has children probably does inherit from Parent, I'm 
> not concerned about those controls. Not all controls on your page 
> inherit from Parent, those are the ones that I am talking about. This 
> means that they do not have the hasChildren() method. This then means 
> that if I am iterating through all controls on a form I am going to 
> get some that do not have hasChildren() and when I call hasChildren() 
> on that control, I will get an error. Does that make sense. It will 
> once you try it for yourself. I added that method to Object so that 
> every control will at least return false when the method is called. 
> You may not have needed this method yet but I have, and when you can't 
> rely on it being there for every control it makes looping through the 
> controls very difficult.
>
> On the methods for a control, if a new user isn't aware of the various 
> sub-components of a control how are they going to know where to look 
> to find a certain method or property? If they are all available from 
> the root control, the user has a single place to go to find what they 
> are looking for. I speak from experience. I am more aware then the 
> average user and I still have to navigate all the different parts of 
> the Table to find the property or method I am looking for. I would 
> much rather see a long list of everything available, then a bunch of 
> smaller lists that are all hidden from view and I have to go looking 
> for them. After reading many of the posts in this list I am not the 
> only one that feels this way.
>
> Jim
>
> On 4/24/07, *dperez* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
>     Hi Jim,
>
>     If you see a class with hundreds of properties and methods, you
>     can get a
>     little overwhelmed, divide and conquer.
>     This doesn't mean that methods/properties shouldn't be reviewd.
>
>     I think that every control that has children inherits from Parent,
>     like
>     ComboBox, Spinner, Table, ....
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to