On 11 Jul 2014, at 4:34 pm, Ken Thomases <k...@codeweavers.com> wrote:

> Have you connected the delegate outlet of your text view (field?)?

Yes.

On 11 Jul 2014, at 4:54 pm, Quincey Morris 
<quinceymor...@rivergatesoftware.com> 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 <sstan...@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to