• 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
to select a single cell in NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

to select a single cell in NSMatrix


  • Subject: to select a single cell in NSMatrix
  • From: "Navneet Kumar" <email@hidden>
  • Date: Sun, 6 Jan 2008 08:16:36 +0530

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



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: to select a single cell in NSMatrix
      • From: Andrew Merenbach <email@hidden>
  • Prev by Date: Re: thread protocol modifiers
  • Next by Date: Re: thread protocol modifiers
  • Previous by thread: ABPeoplePickerView custom layout?
  • Next by thread: Re: to select a single cell in NSMatrix
  • Index(es):
    • Date
    • Thread