• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Need to set cursor at end of text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Need to set cursor at end of text
      • From: Ron <email@hidden>
    • Re: Need to set cursor at end of text
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Having a problem turning on window.
  • Next by Date: Re: Need to set cursor at end of text
  • Previous by thread: Re: Having a problem turning on window.
  • Next by thread: Re: Need to set cursor at end of text
  • Index(es):
    • Date
    • Thread