Inline sort param variables:
If anyone files this bug report/feature request, let me know!
I will sign on
Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
We used to call that, “polishing poop” which, according to Mythbusters is a
thing. No, really.
On Mar 3, 2021, at 2:02 PM, Paul Dupuis via use-livecode
Perhaps it is a compliment to Livecode/LCS that I EXPECTED it to work and was
It's because when you try to sort something, it's got to be a variable that's
being sorted. So all of the examples you used put "toSort" into the statement
to be "done" coming out compiled as:
sort items of "A,C,T,B" ascending
... which won't work. You need to execute:
I love xTalk. While I have written code in many dozens of languages over
my career, I personally will likely never code in anything other than
xTalk for as long as I continue to write code.
That said, one of the "problems" of a programming language that is so
intuitive is that I sometime
I thought I was pretty clever at using “do”, often going down several levels,
evaluating the whole way before trying to execute a single “do” statement.
Neither of the last lines seem to work:
put "A,C,T,B" into toSort
put "ascending" into sortDir
get "sort items of" && quote &
Paul Dupuis wrote:
> I just discovered much to my dismay that you can not execute the
> put "ascending" into tDirection
> soft lines of tContainer tDirection international
> apparently neither the sort direction (ascending|descending) nor the
> sort type
> apparently neither the sort direction (ascending|descending)
> nor the sort type (international|text|datetime|numeric|binary)
> can be variable!
> I see this a a bug or perhaps a failure to fully
> robust impliment the sort container command?
> Does any one else see this as a bug?
The number of lines being sorted makes o difference.
The number of distinct sorts will - but at a single 'do' for each of
"several hundreds", you'll not even notice except (maybe) if you are
benchmarking it (around 5ms per 1000 'do's on an elderly MacBook Pro).
On 02/03/2021 22:52,
If it is a lot to sort, I am wondering why not use a memory database with the
indexes you need to sort by, or a file database if the data needs to be
On Mar 2, 2021, at 2:52 PM, Paul Dupuis via use-livecode
Okay. Thank you
Okay. Thank you Ralph.
I was reluctant to use "do" for performance reasons. The sort could be
sorting a large number of lines - as many as several hundred sorts of a
thousand to ten thousand lines.
I could of course do timing trials, but does anyone from the mothership
(or anyone period)
I found that you must us a "Do"(thank heaven for "Do"s) if you want to make
variable any LC token that colorizes like "stack", "the", "field", "button",
"put" or "ascending".
I don't think "Do" is a kludge is this case.
Evergreen Information Services
Mail list logo