Re: identify a specific NSImagecell
Re: identify a specific NSImagecell
- Subject: Re: identify a specific NSImagecell
- From: Andy Lee <email@hidden>
- Date: Wed, 19 Apr 2006 11:37:48 -0400
On Apr 19, 2006, at 11:22 AM, Francesca wrote:
As a workaround, you could set the matrix mode to "Radio", and
then in your action method look at [sender selectedRow] and
[sender selectedColumn].
--Andy
_______________________________________________
ok, thanks.
But, I've create an NSMutableArray with the name of the images I
display in my NSMatrix.
Now, I would to open the image at the double click.
So, if I can set to my cell the same index of my array I can
retrieve this info....
It sounds like you wanted to use [sender selectedTag] and use that as
the array index. But you can't, because you can't set tags of image
cells. So instead I am suggesting that you look at [sender
selectedRow] and [sender selectedColumn]. Those two numbers will
tell you the position of the cell that was double-clicked. You can
use them to compute the index you want for your NSMutableArray. If
your matrix only has one row, you can simply use [sender
selectedColumn] as the array index.
Note that first you must set the "Mode" of the matrix to "Radio" in
Interface Builder.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden