Jump to content


Photo

Converted from PropertiesView to newest NextInspector


  • Please log in to reply
5 replies to this topic

#1 MasterEvil

MasterEvil
  • Members
  • 104 posts
  • Location:Germany

Posted 01 June 2005 - 07:24 PM

Hi Boki,

I have a error/bug after converting from PropertiesView to NextInspector.

Everything, except one, works fine. I can compile and run.
But at the first action with the Inspector (LoadValues or click into the inspector) I get an error in the methode "GetColorFromHTML" in SharedCommon, saying:
EConvertError: $00lWhite is not a valid Integer value

He seems to discard the "c" from clWhite and change it to the hex value $00.

Any idea?

greetz
Steffen

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 01 June 2005 - 09:46 PM

Hello Steffen,

Add this one line on top of this function:

CODE
if Integer(Color) < 0 then Color := GetSysColor(Color and $000000FF);


and this will solve your problem

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 MasterEvil

MasterEvil
  • Members
  • 104 posts
  • Location:Germany

Posted 01 June 2005 - 10:04 PM

Hi Boki,

thanks for your quick answer but this don't work.

You say "this function", so I assume you mean the function GetColorFromHtml, but in this Function there is no variable Color and the HTMLColor var is just a string and won't work with your line of code.

What have I misunderstood? wink.gif

greetz
Steffen

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 01 June 2005 - 10:12 PM

Hello,

Oops, I have made mistake sad.gif Put this line into HTMLColorToString function instead.

But, I don't know how clWhite is passed into this function, because this function is used only when ColorKind is skWeb. Do you have any TNxColorItem inside your NextInspector? Maybe you have set Value to some delphi formated color (clWhite, $00ff3300, clGrayText...), but you have set ColorKind to ckWeb (used for #339900, #ff3356...)?

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 MasterEvil

MasterEvil
  • Members
  • 104 posts
  • Location:Germany

Posted 04 June 2005 - 01:27 AM

Hi Boki,

I have added the line into the function, but it didn't change a thing.
Same error.

I have some Color Properties with ckWeb in my Inspector.
All with DefaultValue = transparent.

But it worked all fine with PropertiesView. I get these errors since NextInspextor.

greetz
Steffen

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 04 June 2005 - 02:21 AM

Hello Steffen,

You can not set value of ColorItem to some non-color Value smile.gif . If you want to have transparent color, set it to empty string.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users