Re: Selected range in bound text view
Re: Selected range in bound text view
- Subject: Re: Selected range in bound text view
- From: "D.K. Johnston" <email@hidden>
- Date: Sun, 02 Jul 2006 07:12:13 -0700
On 2 Jul, 2006, at 00:46, Matt Neuburg wrote:
On Sat, 01 Jul 2006 10:43:00 -0700, "D.K. Johnston" <email@hidden>
said:
I'm trying to setSelectedRange in a text view that is bound to a
window controller (via attributedString). I can see no relevant
binding in the text view. I've got an IBOutlet connected to the text
view, but sending a setSelectedRange message to it has no effect.
The binding is a red herring. It should work fine. I'm betting that
your
IBOutlet is nil, or some such slip-up. m.
I found the problem. The setSelectedRange message is being received;
but the text view (for reasons known only to itself) was then
resetting the selected range to a blank line at the end of the text.
Since the line was blank, the highlighting wasn't visible.
I've since got rid of the blank line. Now all I need to do is to
figure out how to send my setSelectedRange message after the text
view has finished doing whatever it is it has to do. I'm sending it
after the text view has loaded its attributed string.
dkj
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden