Board index » delphi » How to derive a new class from TField

How to derive a new class from TField

The Sybase SQL-Anywhere DBMS does not support the boolean-type. It is
implemented as a integer-subtype BIT. The BDE does not recognize this
type as Boolean. So the field-editor in Delphi creates a TSmallIntField.
My idea is, to derive a new TMyBoolean-class from TSmallIntField and to
override the Get- and SetBoolean-methods.
But: How can I access this type in the field-editor, or in the
"datamodule-as-text-editor" ?
Do anyone have a better idea to get a type-conform component in Delphi
?

michael

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:How to derive a new class from TField


The Sybase SQL-Anywhere DBMS does not support the boolean-type. It is
implemented as a integer-subtype BIT. The BDE does not recognize this
type as Boolean. So the field-editor in Delphi creates a TSmallIntField.

My idea is, to derive a new TMyBoolean-class from TSmallIntField and to
override the Get- and SetBoolean-methods.
But: How can I access this type in the field-editor, or in the
"datamodule-as-text-editor" ?
Do anyone have a better idea to get a type-conform component in Delphi ?

michael

Re:How to derive a new class from TField


This question really belongs in the
borland.public.delphi.vcl.components.writing newsgroup.

Juan

Quote
Michael Grahl wrote in message <363B2853.1496B...@technet.net>...
>The Sybase SQL-Anywhere DBMS does not support the boolean-type. It is
>implemented as a integer-subtype BIT. The BDE does not recognize this
>type as Boolean. So the field-editor in Delphi creates a TSmallIntField.

>My idea is, to derive a new TMyBoolean-class from TSmallIntField and to
>override the Get- and SetBoolean-methods.
>But: How can I access this type in the field-editor, or in the
>"datamodule-as-text-editor" ?
>Do anyone have a better idea to get a type-conform component in Delphi ?

>michael

Re:How to derive a new class from TField


Quote
> My idea is, to derive a new TMyBoolean-class from TSmallIntField and to
> override the Get- and SetBoolean-methods.
> But: How can I access this type in the field-editor, or in the
> "datamodule-as-text-editor" ?
> Do anyone have a better idea to get a type-conform component in Delphi ?

Look at the RegisterFields function.

Harold Howe [TeamB]
http://www.bcbdev.com

Other Threads