Article View: borland.public.cppbuilder.nativeapi
Article #12072Re: Binding methods to events
From: Remy Lebeau (TeamB)
Date: Thu, 01 Jan 2004 22:08
Date: Thu, 01 Jan 2004 22:08
28 lines
1877 bytes
1877 bytes
"Nik" <armstrong_louie@hotmail.com> wrote in message news:3ff4571a$1@newsgroups.borland.com... > typedef void __fastcall (__closure *TssIPCTextMsgRecieved)(System::TObject* > Sender, AnsiString MsgBuf); That is expecting a class method to be assigned to it, however... > //This is what it made.... > void __fastcall ssSimpleIPC1TextMsgRecieved(TObject *Sender, AnsiString > MsgBuf) ... that is not a class method to begin with. That is a standalone function instead... > //and the error message is... > [C++ Error] DLLUnit.cpp(59): E2034 Cannot convert 'void (_fastcall > *)(TObject *,AnsiString)' to 'void (_fastcall * (_closure )(TObject > *,AnsiString))(TObject *,AnsiString)' ... and that is exactly what that error is complaining about. You are trying to assign a standalone function to an event that expects a member of a class instead. Gambit
Technical Details
Message-ID:
<3ff49918$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3ff3e34b@newsgroups.borland.com> <3ff3fe5b$1@newsgroups.borland.com> <3ff4571a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a9208b78d316a119 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-01 14:09:25 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ff3e34b@newsgroups.borland.com> <3ff3fe5b$1@newsgroups.borland.com> <3ff4571a$1@newsgroups.borland.com> Subject: Re: Binding methods to events Date: Thu, 1 Jan 2004 14:08:37 -0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.139.199 Message-ID: <3ff49918$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1072994584 67.22.139.199 (1 Jan 2004 14:03:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail