 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sam Guest
|
Posted: Thu Oct 09, 2003 6:20 am Post subject: IStrings and TStrings |
|
|
Hi,
I am trying to convert my non-visual VCL component into an ActiveX Control.
I have changed my non-visual component source which used to inherit from
TComponent to TWinControl, and installed it so that it appears in the
ActiveX Wizard. I've used the Wizard to create the ActiveX, but when I try
to Register or install the ActiveX, I get the following error:
" Incompatible Types: 'IStrings' and 'TStrings' "
This is because the actual type is TStrings, but the wrapper method uses
IStrings.
How can I overcome this error?
Thanks.
--
Sam
|
|
| Back to top |
|
 |
Sam Guest
|
Posted: Thu Oct 09, 2003 6:45 am Post subject: Re: IStrings and TStrings |
|
|
Hi,
Thanks for the tip. I am a newbie. How do I use the TStringsAdapter? Do u
mean change the 'IStrings' to 'TStringsAdapter'? Is that compatible with
DAX? I just tried doing that, but gives the same error!
--
Sam
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote
| Quote: | Hello, Sam!
You wrote on Thu, 9 Oct 2003 11:50:59 +0530:
This is because the actual type is TStrings, but the wrapper method uses
IStrings.
How can I overcome this error?
Use TStringsAdapter.
Cheers,
Ignacio
|
|
|
| Back to top |
|
 |
Ignacio Vazquez Guest
|
Posted: Thu Oct 09, 2003 1:32 pm Post subject: Re: IStrings and TStrings |
|
|
Hello, Sam!
You wrote on Thu, 9 Oct 2003 12:15:36 +0530:
| Quote: | Thanks for the tip. I am a newbie. How do I use the TStringsAdapter? Do u
mean change the 'IStrings' to 'TStringsAdapter'? Is that compatible with
DAX? I just tried doing that, but gives the same error!
|
Take a look at the description of TStringsAdapter in the Delphi help.
Cheers,
Ignacio
|
|
| Back to top |
|
 |
Dennis Passmore Guest
|
Posted: Thu Oct 09, 2003 5:56 pm Post subject: Re: IStrings and TStrings |
|
|
var
fGroups: TStringlist;
function TForm1.Get_Groups: IStrings;
begin
GetOLEStrings(fGroups, Result);
end;
procedure TForm1.Set_Groups(const Value: IStrings);
begin
SetOLEStrings(fGroups, Value);
end;
Dennis Passmore
Ultimate Software, Inc.
|
|
| Back to top |
|
 |
Sam Guest
|
Posted: Fri Oct 10, 2003 4:06 am Post subject: Re: IStrings and TStrings |
|
|
Thanks. That Works.
--
Sam
<Dennis Passmore> wrote
| Quote: |
var
fGroups: TStringlist;
function TForm1.Get_Groups: IStrings;
begin
GetOLEStrings(fGroups, Result);
end;
procedure TForm1.Set_Groups(const Value: IStrings);
begin
SetOLEStrings(fGroups, Value);
end;
Dennis Passmore
Ultimate Software, Inc.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|