Yes. That's quite an upset of the existing codebase. Not to mention the fact
that return Elements that would have to be explicitly cast into more
specific classes, which would make the code very ugly.

Oh well, life's tough...

Bojan

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 28, 2000 2:56 AM
> To:   ECS
> Subject:      RE: More XHTML...
> 
> 
> No.
> 
> Table table = new Table().addElement(new TR().addElement(new TD
> ())).setWidth("100%").setCellSpacing("10")); // currently works.
> 
> If we made that change it wouldn't because Element knows nothing about
> setWidth or setCellSpacing as they are specific to Table.
> 
> -stephan
> 
> 
> 
>  
> 
>                     Richard McKinley
> 
>                     <RichardM@keystonelea        To:     "'ECS'"
> <[EMAIL PROTECTED]>
> 
>                     rning.com>                   cc:
> 
>                     Sent by:                     Subject:     RE: More
> XHTML...                                                                 
>                     <[EMAIL PROTECTED]
> 
>                     s.com>
> 
>  
> 
>  
> 
>                     09/27/00 09:58 AM
> 
>                     Please respond to
> 
>                     "ECS"
> 
>  
> 
>  
> 
> 
> 
> 
> 
> Here is the the method as it is now:
> 
> public Table addElement(Element element)
>     {
>         addElementToRegistry(element);
>         return(this);
>     }
> 
> Would it not be as easy as changing it to this:
> 
> public Table addElement(Element element)
>     {
>         addElementToRegistry(element);
>         return(element);  //replace *this* with *element* (which is the
> newly added element)
>     }
> 
> Is that what you need?
> 
> -----Original Message-----
> How much of the upset would be to return Element from addElement,
> removeElement and other methods that normally return the more specific
> class(A, Html, Table etc.)?
> 
> 
> --
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> --
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]


--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to