NSCell subclass editing
NSCell subclass editing
- Subject: NSCell subclass editing
- From: tiennou <email@hidden>
- Date: Tue, 2 Oct 2007 15:16:27 +0200
Hi !
I'm trying to build a custom cell for inclusion in a NSTableView that
should represent a file on disk. This cell shows a file icon, a file
name, and a small 'change' button when hovered (I haven't got to the
hovering part, since that's eye-candy IMHO). I actually have code
that make it draw like I want, but I can't find a 'nice' way to
handle editing.
I would like to display an NSOpenPanel when the 'change' button is
clicked, and get back the new path (as an NSString) from the
NSTableView delegate method - tableView:setObjectValue:..., but I
haven't been able to do so.
I tried overriding NSCell -
editWithFrame:inView:editor:delegate:event:, but it's never called...
One of the alternate ways I've found is to use NSApp's -
sendAction:to:from: with as action a selector I add to my main window
controller and sender my cell, which kinda works, but it forces me to
lookup the data corresponding to the cell, which is cumbersome...
Etienne Samson
_______________________________________________
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