FROM : Navneet Kumar
DATE : Sun Jan 06 03:46:36 2008
Hi,
I am working on an app that shows a file's preview in hex (see attached
image of the NSMatrix).
I wish to highlight a single cell when the user clicks on it. For that I
zeroed in on target/action mechanism.
But its not working for me.
What I have done:
In AppController.m in init():
[matrixHex setTarget:@selector(cellClicked:)];
[ self enableHexCells];
In enableHexCells() I'm doing:
-selecting cells recursively(selectCellAtRow: column:), then
[[matrixHex selectedCell] setEnabled];
In cellClicked() I'm doing:
[[sender selectedCell] setHighlighted:YES]
For target/action mechanism I have connected cellClicked in AppController as
the target of this NSMatrix.
What's the right way to implement this mechanism. In debugger the control
never reaches cellClicked().
Wishes,
Navneet
DATE : Sun Jan 06 03:46:36 2008
Hi,
I am working on an app that shows a file's preview in hex (see attached
image of the NSMatrix).
I wish to highlight a single cell when the user clicks on it. For that I
zeroed in on target/action mechanism.
But its not working for me.
What I have done:
In AppController.m in init():
[matrixHex setTarget:@selector(cellClicked:)];
[ self enableHexCells];
In enableHexCells() I'm doing:
-selecting cells recursively(selectCellAtRow: column:), then
[[matrixHex selectedCell] setEnabled];
In cellClicked() I'm doing:
[[sender selectedCell] setHighlighted:YES]
For target/action mechanism I have connected cellClicked in AppController as
the target of this NSMatrix.
What's the right way to implement this mechanism. In debugger the control
never reaches cellClicked().
Wishes,
Navneet
| Related mails | Author | Date |
|---|---|---|
| Navneet Kumar | Jan 6, 03:46 | |
| Andrew Merenbach | Jan 6, 04:23 |






Cocoa mail archive

