Page 1 of 1

fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 4:01 pm
by thatkeith
Silly question I'm sure, but why is the fillFore of an object controlled in the Inspector by the button called backgroundColor? Especially when there is such a thing as foregroundColor, which isn't a synonym for fillFore? #confused

Re: fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 4:31 pm
by dunbarx
Hi.

According to the dictionary, "fillFore" is indeed a synonym for foregroundColor.

What button are you referring to?

Craig

Re: fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 7:54 pm
by thatkeith
If I set the fillFore of something to a color the Inspector palette icon here, second down in the second column, shows the color.
If I set the backgroundColor of something the same icon shows the color.
If I hover over the button icon I get "backgroundColor" shown in the tooltip.
If I set the foregroundColor of an object the border – not the fill – changes color, and the FIRST icon in the second column shows the color. So fillFore seems *not* to be a synonym of foregroundColor, at least in practice.

I know what to use to make things work, but when I look at the logic it is... confusing.
fillFore or backgroundColor.png

Re: fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 8:01 pm
by jacque
It looks like a very specific engine bug, maybe because fewer people use "fillFore" and so no one has ever caught it. If you instead use "foreColor" or "foregroundColor" it behaves as you'd expect. So, it appears the engine isn't correctly translating the synonym, which you might want to report. Some engineer somewhere had a thinko. :)

Re: fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 8:21 pm
by thatkeith
I will report a bug if I can get my head around what to say! Perhaps someone can help? Try this: make three image objects, three graphic objects and three buttons. Make the graphic objects opaque. Run the following lines:

Code: Select all

set the borderColor of image 1 to "red"
set the foregroundColor of image 2 to "red"
set the fillFore of image 3 to "red"

set the borderColor of graphic 1 to "red"
set the foregroundColor of graphic 2 to "red"
set the fillFore of graphic 3 to "red"

set the borderColor of button 1 to "red"
set the foregroundColor of button 2 to "red"
set the fillFore of button 3 to "red"
Then select each one in turn and look at the Inspector palette's Colors & Patterns pane, and also the object's appearance on the card. There is *some* consistency. But it isn't complete, and the Dictionary doesn't seem to help.

:cry:

Re: fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 8:24 pm
by jacque
I think that would be an excellent report. They would like you to create and upload the sample stack though, they need something to look at immediately so they can quickly verify the problem.

Re: fillFore, backgroundColor?

Posted: Sun Mar 09, 2014 10:17 pm
by thatkeith
Thanks. :)
Done, bug 11902.

Re: fillFore, backgroundColor?

Posted: Mon Mar 10, 2014 8:56 pm
by thatkeith
Bug confirmed. Order will return to the universe. :)

Re: fillFore, backgroundColor?

Posted: Mon Mar 10, 2014 11:59 pm
by jacque
Wow, you saved the universe! Thank you. :)

Re: fillFore, backgroundColor?

Posted: Tue Mar 11, 2014 11:00 am
by thatkeith
Image

:lol: