The class wrappers themselves are correct and the code *appears* to be
doing the correct thing when you look at it. I think I've picked the
wrong QC entry.
I'll restate the bug: I have a control which I want turned into an
ActiveX control. I get Delphi to generate the wrapper (which it seems
to do). But one of the events on the activeX control, when it fires,
seems to have scrambled the parameter values of the event. two
parameter values are in the wrong place, and the rest are all 0. The
parameters are of type Single which is Ole compliant.
The code generated by the wrapper is as follows:
procedure TT3SDKEventsX.ObjectClickedEvent(LayerID, ObjectID: Integer;
ATop,
ALeft, ABottom, ARight, MouseX, MouseY: Single; WParam: Integer);
begin
if FEvents <> nil then FEvents.OnObjectClicked(LayerID,
ObjectID, ATop, ALeft, ABottom, ARight, MouseX, MouseY, WParam);
end;
I even edited the wrapper to show a message box with the parameter
values just before calling the FEvents.OnObjectClicked and the message
box showed the correct values. However, somewhere between
FEvents.OnObjectClicked being called, and the event surfacing on the
activeX control, the parameters get scrambled.
I'm stumped as to how to work out where it goes wrong.
Phil.
Todd Martin wrote:
If that is the case, why not just
edit the class wrappers and recompile? Do you need to import the type
library over and over?
Todd.
-----
Original Message -----
Sent:
Tuesday, October 17, 2006 3:15 PM
Subject:
Re: [DUG] BDS2006 and ActiveX
The URL for the QC entry which I think is relevant here is:
http://qc.borland.com/wc/qcmain.aspx?d=398
It mentions that it is resolved in build 7.0.4.453
Aha! The penny has just dropped that this is fixed in Delphi 7 (hence
build 7.blahblah). Which I don't have. Bother.
Anyone have a copy of version 7 they don't use anymore?
Phil.
Richard Vowles wrote:
If you refer me to the QC, I can ask Support for you.
________________________________
From: [EMAIL PROTECTED] on behalf of Phil Middlemiss
Sent: Fri 13/10/2006 10:51
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] BDS2006 and ActiveX
OK, I found an entry in QC that might be the one but it refers to a later build than I have. As far as I know I have applied all relevant service packs to D6 - where do I look for later build updates?
Cheers,
Phil.
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date: 10/14/2006
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date:
14/10/2006
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date: 10/14/2006
|
begin:vcard
fn:Phil Middlemiss
n:Middlemiss;Phil
org:Vision Software, MTS Ltd
email;internet:[EMAIL PROTECTED]
title:Project Leader
tel;work:+64 7 3480001
tel;cell:+64 27 4592648
x-mozilla-html:TRUE
url:http://www.tumonz.co.nz
version:2.1
end:vcard
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi