On 18/10/2011, at 4:25 PM, Sandeep Mohan Bhandarkar wrote:
> Hi All,
>
> I have created a NSCollectionView currently i am able to add prototypeItems
> to this view. For removing items i have a "-" button which i have placed
> in the prototypeItemView itself. I have also written an IBAction for its
> removal. It is as provided below
>
>
> -(IBAction)removeAction:(id)sender
> {
>
> NSIndexSet* selectedIndexSet = [_lablesCollectionView selectionIndexes];
> NSUInteger index = [selectedIndexSet firstIndex] ;
> NSLog(@"index is %d", index);
> [lablesArray removeObjectsAtArrangedObjectIndexes:selectedIndexSet];
> }
>
> Here lablesArray is an ArrayController object. This is working currently but
> i have to select the prototypeItem view first and then click on the "-"
> button. can some one tell me if
> there is a way where in i can directly remove the item just by clicking on
> "-" and not selecting the prototypeItemView.
>
Hello, Sandeep,
Not sure, but I think have a look at -acceptsFirstMouse.
Ron
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]