[EMAIL PROTECTED] wrote:
> > But I would like to see that implemented via composition rather than
> > extension.
>
> I have read the Unicode Standard docs. But What do you mean by
> "composition rather than extension".
>
> As I remember, each (Unicode) character like Arabic, are stored a as a
> sequence of data that a S.O. rendering engine merge into a single visual
> "glyph".

Take TEdit for example, which has been extended to contain properties like 
the Font property.

These properties have really nothing to do with TEdit, but are rather 
specific to the rendering engine.  So instead of extending TEdit by adding a 
Font property, it would be better to place them into a new component TRender 
and linking this with TEdit.

The same goes with Bidi, where instead of adding a Bidi property to TEdit it 
would be placed in a new component TRender/TBidi and then linked with TEdit.

This is called composition, which is almost always the preferred method of 
extension in OOP, and is similar in concept to the act of normalization in a 
Relational DB.

Thanks!

--
Al

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to