BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IStrings and TStrings

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development
View previous topic :: View next topic  
Author Message
Sam
Guest





PostPosted: Thu Oct 09, 2003 6:20 am    Post subject: IStrings and TStrings Reply with quote



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





PostPosted: Thu Oct 09, 2003 6:45 am    Post subject: Re: IStrings and TStrings Reply with quote



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





PostPosted: Thu Oct 09, 2003 1:32 pm    Post subject: Re: IStrings and TStrings Reply with quote



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





PostPosted: Thu Oct 09, 2003 5:56 pm    Post subject: Re: IStrings and TStrings Reply with 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
Sam
Guest





PostPosted: Fri Oct 10, 2003 4:06 am    Post subject: Re: IStrings and TStrings Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.