Re: Set editable string into NSTextFieldCell
Re: Set editable string into NSTextFieldCell
- Subject: Re: Set editable string into NSTextFieldCell
- From: Graham Cox <email@hidden>
- Date: Thu, 12 Nov 2015 08:38:42 +1100
> On 12 Nov 2015, at 7:19 AM, Raglan T. Tiger <email@hidden> wrote:
>
> n my cell based NSOutlineView subclass I implement -mouseDown where I check for double-click. I am able to set a placeholder string.
>
> How does one set the NSText object with a string value that can be edited?
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.
—Graham
_______________________________________________
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