• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSCell subclass editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSCell subclass editing
      • From: Boris Remizov <email@hidden>
  • Prev by Date: Re: Sockets or NSStreams (was Re: mail-in db/app)?
  • Next by Date: Re: Where are the boundaries of Cocoa and how are the boundaries perceived ?
  • Previous by thread: NSSegmentedControl incorrect rendering inside a NSToolbar
  • Next by thread: Re: NSCell subclass editing
  • Index(es):
    • Date
    • Thread