objective c - Click on NSCollectionView returns always the same object -


i' ve nscollectionviewitem subclass, called myitem used item of nscollectionview. need enumerate item in collection view set delegate each item code:

nsuinteger categorynumber = [self.collectionview.content count];  (nsuinteger cont = 0;cont < categorynumber;cont++) {      myitem *categoryitem = (myitem*)[self.collectionview itematindex:cont];      categoryitem.interactiondelegate = self;  } 

using debugger saw code works aspect , in each iteration myitem points different object each time. problem when use mousedown event on myitem class receive same object whatever item click on nscollectionview. seems collection view use 1 class (the cell template instance?). have idea of going on? thanks

the problem in part of code , nscollectionview returns, obviously, correct object each time.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -