Need to set cursor at end of text
Need to set cursor at end of text
- Subject: Need to set cursor at end of text
- From: Brian Christmas <email@hidden>
- Date: Tue, 27 Jan 2015 15:29:41 +1100
G’day scripters
This is supposed to be simple, I need to set the cursor to the end of the text of a field, but the recommended method is failing, with an ‘Unrecognised selector’ error, on line p=5, sender's setSelectedRange:textRange.
I’ve tried the following code, but cannot work out what I’m doing wring. Any advice please?
Regards
Santa
on setMailList2:sender try set p to 1 set my mailAddressesSecondaryError to sender's stringValue() as text # It’s a bound value, but I’ve added this to be sure. set p to 2 if (last paragraph of my mailAddressesSecondaryError) is not in {"", return} then set my mailAddressesSecondaryError to my mailAddressesSecondaryError & return as text set p to 3 my saveTheGeneralData() set p to 4 set textRange to {(count of my mailAddressesSecondaryError), 0} set p to 5 sender's setSelectedRange:textRange on error errmsg number errnum display dialog errmsg & " p = " & p end try end setMailList2:
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden