Article View: borland.public.cppbuilder.nativeapi
Article #12054Binding methods to events
From: Nik
Date: Thu, 01 Jan 2004 09:13
Date: Thu, 01 Jan 2004 09:13
19 lines
1418 bytes
1418 bytes
I have the ability to assign a method to an event in delphi simply by creating a function in exactly the same way the event requires and then assigning the OnEvent to = the function i created. eg. function EventFunction(params:whatever); object.OnEvent = EventFunction; What is the equivalent to this in C++?? I have an object that I've brought into CPPB (it is a single .pas file). I am able to bind a method to an event very easilly in delphi but I'm not sure quite how to do it in C++. It doesn't seem to work when i try to do it exactly the same way as delphi. Thanks in advance. Nik
Technical Details
Message-ID:
<3ff3e34b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a9208b78d316a119,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-01 01:09:16 PST From: "Nik" <armstrong_louie@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Binding methods to events Date: Thu, 1 Jan 2004 04:13:37 -0500 Lines: 21 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: 24.43.85.53 Message-ID: <3ff3e34b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1072948043 24.43.85.53 (1 Jan 2004 01:07:23 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail