• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: identify a specific NSImagecell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: identify a specific NSImagecell
      • From: Francesca <email@hidden>
References: 
 >identify a specific NSImagecell (From: Francesca <email@hidden>)
 >Re: identify a specific NSImagecell (From: Andy Lee <email@hidden>)
 >Re: identify a specific NSImagecell (From: Francesca <email@hidden>)

  • Prev by Date: Re: memory leak in readInBackgroundAndNotify
  • Next by Date: Re: identify a specific NSImagecell
  • Previous by thread: Re: identify a specific NSImagecell
  • Next by thread: Re: identify a specific NSImagecell
  • Index(es):
    • Date
    • Thread