Page 1 of 1
Why is sort starting at the bottom of a field?
Posted: Wed Oct 29, 2014 6:32 pm
by sphere
Hello, i need a little help.
Why is the command sort staring at the bottom when sorting a-z?
If i use descending then it starts at the top of the field but sorts z-a.
Code: Select all
on mouseUp
sort field "blabla" ascending text
end mouseUp
How should it be when starting at the top and a-z?
The dictionary doesn't bring me much further.
Thansk for any help.
Re: Why is sort starting at the bottom of a field?
Posted: Wed Oct 29, 2014 10:24 pm
by sphere
what the H***
ok must be something in my script or so
as i take a new stack just to test this it works ok.

Figuring out mode ON

Re: Why is sort starting at the bottom of a field?
Posted: Wed Oct 29, 2014 11:00 pm
by Klaus
Gremlins!

Re: Why is sort starting at the bottom of a field?
Posted: Thu Oct 30, 2014 4:51 pm
by jacque
I'm trying to figure out what "start at the bottom" means.
Wait, do you mean there are blank lines at the top before the actual sorted text begins? Empty lines sort before anything else. Remove them before sorting. One way:
Code: Select all
filter tText without empty
sort lines of tText
Re: Why is sort starting at the bottom of a field?
Posted: Thu Oct 30, 2014 7:31 pm
by sphere
Hi Jacqueline, yes that's exactly what happened.
As i was figuring out how to let the input field react on the enter key, so that an user can add the line of text to the field instead of having to click on the button ADD, this added empty lines to the field, because it was only reacting after a few times hitting the enter key. So temporarely turned that piece of code off, so that first sorting is working.
Thanks a lot for your code i will test this right away.
After that i have to sort out how to let the cursor jump to line when the first letter of an email address is hit. First i had to find that the added lines to the field can't be overwritten by entering text, i found that in the property's of the field.
BUt one step at a time, i allready came far in such a short amount of time. Getting the results makes it even more fun
Thanks !