fillFore, backgroundColor?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

fillFore, backgroundColor?

Post by thatkeith » Sun Mar 09, 2014 4:01 pm

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
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: fillFore, backgroundColor?

Post by dunbarx » Sun Mar 09, 2014 4:31 pm

Hi.

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

What button are you referring to?

Craig

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: fillFore, backgroundColor?

Post by thatkeith » Sun Mar 09, 2014 7:54 pm

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
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: fillFore, backgroundColor?

Post by jacque » Sun Mar 09, 2014 8:01 pm

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. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: fillFore, backgroundColor?

Post by thatkeith » Sun Mar 09, 2014 8:21 pm

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:
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: fillFore, backgroundColor?

Post by jacque » Sun Mar 09, 2014 8:24 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: fillFore, backgroundColor?

Post by thatkeith » Sun Mar 09, 2014 10:17 pm

Thanks. :)
Done, bug 11902.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: fillFore, backgroundColor?

Post by thatkeith » Mon Mar 10, 2014 8:56 pm

Bug confirmed. Order will return to the universe. :)
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: fillFore, backgroundColor?

Post by jacque » Mon Mar 10, 2014 11:59 pm

Wow, you saved the universe! Thank you. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 383
Joined: Mon Mar 01, 2010 7:13 pm
Contact:

Re: fillFore, backgroundColor?

Post by thatkeith » Tue Mar 11, 2014 11:00 am

Image

:lol:
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply