Re: Set editable string into NSTextFieldCell
Re: Set editable string into NSTextFieldCell
- Subject: Re: Set editable string into NSTextFieldCell
- From: "Raglan T. Tiger" <email@hidden>
- Date: Wed, 11 Nov 2015 15:52:29 -0700
> On Nov 11, 2015, at 2:38 PM, Graham Cox <email@hidden> wrote:
>
> You don’t need to subclass NSOutlineView here. Double-clicks are already detected and trigger the -doubleAction: be sent to the target of the control. This is usually sufficient. If you leave everything standard, then editing text cells should ‘just work’ as long as you set the necessary flags to allow editing, and implement the dataSource methods that update the model for the edited property.
I have a subclass for reasons other than what is being discussed here. My issue is, if I do nothing then, when the user double-clicks an item in the outline a text field is displayed and the user can enter a new string, press enter and all works well. My model is updated etc, etc.
How do I put the current string from the item into the edit field ?
I can put a placeholder string there but this is not an editable value.
-rags
_______________________________________________
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