Distinct action messages from matrix of NSButtonCells
Distinct action messages from matrix of NSButtonCells
- Subject: Distinct action messages from matrix of NSButtonCells
- From: Brad Werth <email@hidden>
- Date: Wed, 03 Oct 2001 09:20:50 -0700
- Organization: ORCAS, Inc.
Hi all,
I am trying to use an NSMatrix of NSButtonCells to easily manage an
array of buttons in my user interface. What I would like is to be able
to get a distinct action message from each button. Initially, in IB, I
set the target and action of the NSMatrix just to see what would happen.
Well, my action method was getting the NSMatrix as the sender, when
what I really want is one of the NSButtonCells. So then I
programmatically set the target and action of each cell, but this had
the exact same effect.
Is there a way to receive the NSButtonCell as the sender of the action
message? Or is there a way to determine which cell was clicked when the
NSMatrix is the sender? In general, how are people making matrices of
NSButtonCells do anything useful?
Thanks,
Brad Werth
email@hidden