Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Starfox

macrumors 6502
Original poster
Apr 7, 2011
256
9
I have a view-based table view with a column view that has a bunch of buttons and textfields in it - I know how to respond to selectors sent by the buttons (by using rowForView:) but I have no idea as to how to get outlets or pointers to the objects I added to the view so I can set their values. I checked the WWDC video but it doesn't seem to cover this. Any ideas?
 
Learn how to fill a standard NSTableView with data, first. Learn how table view datasources and delegates perform the operations you need to fill the table. When you can write a simple or multi-column table view that does what you want, you will understand how to accomplish what you are asking for.

Sorry that I am not being more helpful, but this is an important thing you need to learn on your own. I am just trying to point you in the right direction.
 
I'm quite familiar with working with cell-based table views, data sources and delegates. Could you give me something more specific?
 
I assume you would be working with objects in a NSTableCellView, which responds to -subviews (being a NSView subclass), so you could use that to get objects by array index, but that would be pretty kludgy. I think I would be inclined to subclass NSTableCellView itself, with outlets in the cell view itself, connected to the objects it contains, and retrieve the objects you need with accessor methods in the subclass.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.