Re: NSMatrix actions
Re: NSMatrix actions
- Subject: Re: NSMatrix actions
- From: "Erik M. Buck" <email@hidden>
- Date: Wed, 10 Oct 2001 20:11:29 -0500
>
I think I'm missing something simple here but these are my thoughts
>
and my problem:
You are missing a fundamental concept.
Action cells store their own target and action. You can set the target and
action of individual cells to any anything by dragging a connection from
individual cells in InterfaceBuilder. The matrix also has a target and an
action.
When a cell is clicked in a matrix:
If the clicked cell has its own target and action, the cell's action is sent
to the cell's target
If the clicked cell has a target but no action then the matrix's action is
sent to the cell's target
If the clicked cell has an action but no target than the cell's action is
sent to the matrix's target
If the clicked cell has no target and no action then the matrix's action is
sent to the matrix's target.
I have no idea what you mean by "standard" actions. You can define any
number of different possible actions and targets if you want.
Read the documentation for NSControl, NSCell, NSActionCell, and the
responder chain in NSResponder. then read about NSMatrix.
NSMatrix inherits from NSControl which inherits from NSView which inherits
from NSResponder which inherits from NSObject. Always read the super class'
documentation! NSControls usually store NSCells so read about them also.