Neven MacEwan said:

> This I would do in the Database - another prob you'll face when
> you open your DB is all that nice logic that aint in your DB
> disappears

The plan is to do an OLE DB driver that allows read only access to the
data, and to provide COM objects for access to writing into the data. That
avoids the issue of having to allow random writes into the data, and
preserves the appropiate seperation between the actual storage and the
business objects that you are really manipulating. Later if we change the
backend storage the COM objects will remain the same and no one will
notice.

> but I do it thus
>
> TmwkDBEdit = class(TdbEdit, IAutoCaption, IDBControl)
> private
>   FAutoCaption: TAutocaption
> published
>   AutoCaption: TAutocaption read FAutoCaption write
> FAutoCaption implements
> IAutoCaption
> end
>
> IDBControl enforces the parent to expose a function Field: TField
>
> override constructor, destructor, CM_VisibilityChanged and a
> cupla WM and we are done
>
> Not a neat as you would do but a lot faster (and I can use
> GetInterface to group  manipulate the captions)

I would argue with the "lot faster" bit 8-) I found that once the base
class was enabled properly I that was needed was to build the extra UI
logic for the various classes of control wanted (numbers, dates, text etc)
and all the data away stuff was done. Another benefit gained was in the
universal cleanup of the keyboard handling so that the same controls can
be floated over a grid for data entry.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to