Subject Re: getColor
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Mon, 22 Feb 2021 12:07:35 -0800
Newsgroups dbase.getting-started

On 2/22/2021 12:02 PM, Peter Hegelbach wrote:
> Hi all
>
>  From OLH: Sample getColor:
>
> function backgroundColorButton_onClick
>     private rgbValue // Use private for &macro
>     rgbValue = getcolor()
>     if rgbValue # ""
>        form.colorscheme1.rowset.fields[ "BACKGROUND" ].value = rgbValue
>        define color SAMPLE_BG &rgbValue
>        form.sampleBackground.colorNormal = "SAMPLE_BG"
>     endif
>
>
> but row   if rgbValue # ""  does in dBase 2019 not work as it should
> it gives back allwas a false
>
>
> I tried also in the command-window:
>
> a = "171,91,242"
> ? a = ""
>
> gives me back a true
>
> Is that a bug or not?

Try

? a == "" // exactly equal

That should return false.

Ken



--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm