On Wed, Feb 16, 2011 at 5:56 PM, Bruce Cresanta <cresa...@me.com> wrote: > > I have an NSTableView set up to a datasource of a single array. When I run > my code, I get two columns (the default in IB) instead of just one with the > data duplicated in each column. I only want one column, how best to > achieve this?
Select the table view in IB, then change its "Columns" attribute in the "Attributes" pane of the inspector panel. > NSButton can be set up to perform a selector in IB on click. How do > you set Target/Action for a button in code? It's pretty rare that you'd need to, so I have to ask the obligatory question: Are you sure you want to do that? If you tell us what you're trying to accomplish, we might be able to help you find a way to do it that doesn't involve setting up the target & action in code. That said: [theButton setTarget:aTarget]; // Set the target to nil to send an action to the responder chain [theButton setAction:@selector(doAction:)]; // Don't forget the colon... sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net _______________________________________________ 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