My guess:
Try using "the effective foregroundColor of each" - that will cover your
bases when there is no assigned foregroundColor.
Phil Davis
On 9/18/14, 10:24 AM, dunb...@aol.com wrote:
Well, I win the fewest lines prize, but surely lose in the "does it work?"
category.
Anyone know why this fails?
on mouseUp
sort lines of fld 1 numeric by sum(the foregroundColor of each)
end mouseUp
Craig Newman
-----Original Message-----
From: Mark Schonewille <m.schonewi...@economy-x-talk.com>
To: How to use LiveCode <use-livecode@lists.runrev.com>
Sent: Thu, Sep 18, 2014 12:52 pm
Subject: Re: Sorting lines on colour (color for some)
Hi Francis,
I haven't tried this but it might work.
put the htmlText of fld x into myHtml
put char 4 to -5 of myHtml into myHtml
set the itemDel to ">"
sort lines of myHtml by item 1 of each
set the htmlText of fld x to "<p>" & myHtml & "</p>"
If this doesn't work, it might at least give a clue of how to handle
this kind of problems.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Installer Maker for LiveCode:
http://qery.us/468
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
LiveCode on Facebook:
https://www.facebook.com/groups/runrev/
On 9/18/2014 18:46, Francis Nugent Dixon wrote:
Hi from Beautiful Brittany (where, finally, it is raining),
I have a list in a field, with backgroundcolor of some lines red, some yellow.
Does anybody know how to sort the lines to separate out the two colours ?
I can do it using a shuffle mechanism, but it’s not elegant enough (:>) !!
The sort container command doesn’t give me the impression that this is a
one-liner …….
He who uses the least lines of code will gain my immediate admiration ……
—Francis
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode