🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3211

Re: TADOTable and BeforeEdit Event Handler

#3211
From: Kim Utley
Date: Fri, 06 Dec 2002 21:03
63 lines
2797 bytes
Thanks much. I figured it was something like that.

Kindest Regards,

Kim


"Vassiliev V.V." <news@vassilievvv.mtu-net.ru> wrote in message
news:3df10286@newsgroups.borland.com...
> Your function must be declared inside class such as
>
> void __fastcall TForm1::MyBeforeEdit (TDataSet *DataSet){};
>
> If you need an external function you should write something like:
>
> class MyClass
> {
>  public:
>   void __fastcall MyBeforeEdit(TDataSet *DataSet) {/*Your code here*/};
> } MyVar;
>
>
> __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner)
> {
>  ADODataSet1->BeforeEdit = MyVar.MyBeforeEdit;
> }
>
> ----------------------------------------------------------------
> Regards,
> Viatcheslav V. Vassiliev
> http://www.oledbdirect.com
> The fastest way to access MS SQL Server, MS Jet (MS Access)
> and Interbase (LCPI provider, http://www.lcpi.lipetsk.ru) databases.
>
> "Kim Utley" <kim@simsware.com> �������/�������� � �������� ���������:
> news:3df0cd97$1@newsgroups.borland.com...
> > Hi All!
> >
> > Have what should be a very simple question. I wish to write an event
> handler
> > for BeforeEdit and AfterEdit. However, I'm getting the following error
on
> a
> > function declared as:
> >
> > void __fastcall MyBeforeEdit( TDataSet * dataSet ) {
> >     //    some stuff...
> > }
> >
> > Cannot convert 'void (__fastcall *)TDataSet *)' to 'void (__fastcall *
> > (__closure)(TDataSet *))(TDataSet *)'
> >
> > Does this mean I have to derive a class from TADOTable in order for the
> > class to call my functions? If so it would seem strange since I get a
> > pointer to the TDataSet object as an argument.
> >
> > TIA,
> >
> > Kim
> >
> >
>
>
Technical Details
Message-ID: <3df1109a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3df0cd97$1@newsgroups.borland.com> <3df10286@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,8ef346d90d5f49bd
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-12-06 13:09:46 PST
From: "Kim Utley" <kim@simsware.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3df0cd97$1@newsgroups.borland.com> <3df10286@newsgroups.borland.com>
Subject: Re: TADOTable and BeforeEdit Event Handler
Date: Fri, 6 Dec 2002 15:03:25 -0600
Lines: 65
Organization: SIMS, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 65.205.74.136
Message-ID: <3df1109a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1039208602 65.205.74.136 (6 Dec 2002 13:03:22 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail