Sorting lines on colour (color for some)

Mark Schonewille m.schonewille at economy-x-talk.com
Thu Sep 18 12:51:33 EDT 2014


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





More information about the use-livecode mailing list