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 

Incompatible types: 'String' and 'TColor'

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Installation
View previous topic :: View next topic  
Author Message
Wayne & Carr
Guest





PostPosted: Tue Mar 01, 2005 7:58 pm    Post subject: Incompatible types: 'String' and 'TColor' Reply with quote



How would I write this?

SearchColorIni := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Data
FilesOptions.ini');
with SearchColorIni do begin
WriteString('Colors', 'SearchColor', SearchColors.Selected); // This line
gets the error
SearchColor := SearchColors.Selected;
end;

Right now I am getting the error

[Error] Project.pas(123): Incompatible types: 'String' and 'TColor'

Thanks All;
Wayne







Back to top
Wayne & Carr
Guest





PostPosted: Tue Mar 01, 2005 8:00 pm    Post subject: Re: Incompatible types: 'String' and 'TColor' Reply with quote



OOOOOOOps... :p
Meant to send this one to Components.Using..

Sorry people

Wayne


Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Tue Mar 01, 2005 8:07 pm    Post subject: Re: Incompatible types: 'String' and 'TColor' Reply with quote



Wayne & Carr wrote:

Quote:
How would I write this?

SearchColorIni := TIniFile.Create(ExtractFilePath(ParamStr(0)) +
'Data FilesOptions.ini');
with SearchColorIni do begin
WriteString('Colors', 'SearchColor', SearchColors.Selected); //
This line gets the error
SearchColor := SearchColors.Selected;
end;

Right now I am getting the error

[Error] Project.pas(123): Incompatible types: 'String' and 'TColor'

WriteString wants to write a string, but you obviously pass a TColor
(TColorBox.Selected is of type TColor). A TColor is an integer type, so
why don't you try to write an Integer:

SearchColorIni.WriteInteger('Colors', 'SearchColor',
SearchsColors.Selected);

--
Rudy Velthuis [TeamB] http://rvelthuis.bei.t-online.de

"Be tolerant of the human race. Your whole family belongs to it -- and
some of your spouse's family too." - Anonymous.

Back to top
Wayne & Carr
Guest





PostPosted: Tue Mar 01, 2005 8:38 pm    Post subject: Re: Incompatible types: 'String' and 'TColor' Reply with quote

Hello Rudy;

Thanks for the reply, even though I did submit to the wrong area.
Thanks for the information.

I am receiving the same error on this line as well
(After I added in the "WriteInteger" into the area's that was needed)

CoolBarColor := CoolBarColors.Selected;
&
CoolBarColors.Selected := CoolBarColor;

How would I write this out?

Thanks once again Rudy;

Wayne


Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Tue Mar 01, 2005 8:51 pm    Post subject: Re: Incompatible types: 'String' and 'TColor' Reply with quote

Wayne & Carr wrote:

Quote:
I am receiving the same error on this line as well
(After I added in the "WriteInteger" into the area's that was needed)

CoolBarColor := CoolBarColors.Selected;
&
CoolBarColors.Selected := CoolBarColor;

You should be able to find the problem by yourself. According to the
error message, the types don't match. Check the type of each of these
items (that is why you have an index in the online help), and see where
the mismatch is.

Followup set to borland.public.delphi.vcl.components.using.general
--
Rudy Velthuis [TeamB] http://rvelthuis.bei.t-online.de

"Room service? Send up a larger room."
-- Groucho Marx

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Installation 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.