That's an awesome app. I've been looking at it, but it's a bit convoluted. I can't quite seem to isolate the basic mechanism at play here. It uses a NSTableView populated with a custom subclass of NSTextFieldCell that supports an image? I'm just looking to have a column of color swatches I can be notified when I click on them. Couldn't I do that with NSTextFields with setBackgroundColor:? The trick then is to get the on-click event.
On Mar 12, 2010, at 3:02 PM, Corbin Dunn wrote: > Try the "AnimatedTableView" example. Feel free to post questions after you > run it. It has a custom mini color picker thingy. > > corbin > > On Mar 12, 2010, at 2:17 PM, Jonathon Kuo wrote: > >> I need to generate an ad-hoc number of color swatches in a floating window >> so that when a user clicks on one of them, the 'active' color of a stylus >> will change to that color. Most likely NSColorWell is not the right tool for >> the job... >> >> On Mar 12, 2010, at 2:10 PM, Kevin Wojniak wrote: >> >>> Subclass and override mouseDown: - however if you're trying to intercept >>> right before the color panel is shown, or a drag starts, that may be >>> trickier. >>> >>> What are you trying to do generally? > > _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com