Re: View-based outline view problem
Re: View-based outline view problem
- Subject: Re: View-based outline view problem
- From: Shane Stanley <email@hidden>
- Date: Fri, 11 Jul 2014 17:24:32 +1000
On 11 Jul 2014, at 4:34 pm, Ken Thomases <email@hidden> wrote:
> Have you connected the delegate outlet of your text view (field?)?
Yes.
On 11 Jul 2014, at 4:54 pm, Quincey Morris <email@hidden> wrote:
> 1. The delegate method ‘control:textShouldBeginEditing:’ seems like it’s called too late. Presumably the selection change needs to be done when the text field gets first responder status, not when the text is actually changed.
Right, that's what I tried and that's what I'm seeing.
>
> 2. It’s not obvious to me how the text field gets first responder status. In the TableViewPlayground sample code, it does, without any apparent support, so I assume this is something built into NSOutlineView -> NSTableViewCell -> textField outlet (when you press Return). I don’t know how you’d customize that if you have a non-standard table cell view. In particular, I don’t see how you’d know *when* this was happening.
FWIW, in my cell-based version I used textView:willChangeSelectionFromCharacterRange:toCharacterRange: in my outline view subclass. But that no longer seems to get called.
> I guess you could solve it with a NSTextField subclass that overrides becoming first responder.
That's all I can think of. Just seems a lot of work for something that doesn't strike me as an uncommon need.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden