In which cases "colorchanged" message is sent
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
In which cases "colorchanged" message is sent
Hi All,
I noticed that a "colorchanged" message is sent when i use dropper tool, but not when i set the brushcolor.
Is there other cases where "colorchanged" message is sent ?
I found something about it in dictionary (lc 8.1.6) but nothings comes.(i saw it in messages watcher)
Best regards
Jean-Marc
I noticed that a "colorchanged" message is sent when i use dropper tool, but not when i set the brushcolor.
Is there other cases where "colorchanged" message is sent ?
I found something about it in dictionary (lc 8.1.6) but nothings comes.(i saw it in messages watcher)
Best regards
Jean-Marc
https://alternatic.ch
Re: In which cases "colorchanged" message is sent
@jmburnod: The colorChanged message is specific to the dropper tool - it is the message it uses to communicate the color selected by the dropper.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: In which cases "colorchanged" message is sent
Thanks for this quick answer
https://alternatic.ch
Re: In which cases "colorchanged" message is sent
First time I heard of this message!?
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: In which cases "colorchanged" message is sent
Hi Klaus,
Same for bucket issue.
Kind regards
Jean-Marc
Probabily because few people work for paint app.First time I heard of this message!?
Same for bucket issue.
Kind regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: In which cases "colorchanged" message is sent
Oh, but it's for so much more than paint operations. Anything in which the user can set colors for any object can benefit from this message.
FWIW I've never heard of it before either. It's not in the v8.2 Dictionary, and I can't check v9 since the Dictionary there doesn't load on Linux - when was that introduced?
FWIW I've never heard of it before either. It's not in the v8.2 Dictionary, and I can't check v9 since the Dictionary there doesn't load on Linux - when was that introduced?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: In which cases "colorchanged" message is sent
Hi Richard,
it is not in the dictionary of LC 9 dp 11, but also not in the dictionary of LC 5.02.
I wonder how many other undocumented gems might be in LC?
Best
Klaus
it is not in the dictionary of LC 9 dp 11, but also not in the dictionary of LC 5.02.
I wonder how many other undocumented gems might be in LC?
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: In which cases "colorchanged" message is sent
Doc request submitted:
http://quality.livecode.com/show_bug.cgi?id=20854
http://quality.livecode.com/show_bug.cgi?id=20854
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: In which cases "colorchanged" message is sent
I tested:Oh, but it's for so much more than paint operations. Anything in which the user can set colors for any object can benefit from this message.
brushcolor no sent
backgroundcolor no sent
textcolor no sent
It seems indeed only dropper tool sends colorchanged message
https://alternatic.ch
Re: In which cases "colorchanged" message is sent
As I said above - the 'colorChanged' message is how the *dropper* tool communicates the color that was chosen (I must confess I wasn't aware of it until I searched for it in the source!) - if it didn't send a message the tool wouldn't do anything useful (how would you know what color had been chosen?).
The dropper tool is a user-initiated action (beyond choosing the tool) - so that's why it sends a message.
The only way to set the a color of an object in LC is in script - which has to be scripted, and if you've scripted it you know you've changed it - hence they don't send a message.
The dropper tool is a user-initiated action (beyond choosing the tool) - so that's why it sends a message.
The only way to set the a color of an object in LC is in script - which has to be scripted, and if you've scripted it you know you've changed it - hence they don't send a message.