I developed an application for Mac OS X Lion using my new NSTableView based on presentation, but since I want to port the entire application to Snow Leopard, I am trying to find a better way to imitate this kind. So far I have created an NSCollectionView, and everything is fine, except that I cannot get the view index from which the button click event is fired. In Lion, I have the following function:
- (IBAction)buttonClick:(id)sender
so I can get the view index inside the tableview using a method (I cannot remember its name), for example
- (NSInteger)rowForView:(NSView *)aView
when aView is the sender's supervisor, but I could not find something like this to represent the collection ... The only "useful" method seems
- (NSCollectionViewItem *)itemAtIndex:(NSUInteger)index
(or something like this), but it cannot help me, since it returns an NSCollectionViewItem, and I canβt even access it, knowing only the corresponding view!
Nickkk
source share