Ask a Question related to Mac Programming, Design and Development.
-
Simon Slavin #1
Cocoa: detecting click in NSMatrix
Okay, how the hell am I meant to do this ?
I've set an IBAction as the target for my matrix and my
routine does actually get called when the user clicks on
the matrix, but it's always one call behind: first click
gets ignored. I need to detect clicks and then tell which
cell was clicked in. Currently I'm using
- (IBAction)matrixTarget:(id)sender
then finding the clicked cell by looking at the selection
of the matrix.
I didn't do any subclassing. Should I be doing stuff with
mouseDown ? Subclassing the NSMatrix ? Subclassing NSCell ?
I was thinking of using an NSTable instead but I need to have
different cells contain different colour text and I need each
cell to have a different toolTip and it seemed easier with a
matrix of NSTextFields. The text fields don't need to be
editable by the user, they just get set by the program.
I've done far more clever things with Cocoa than this but
this particular one has me completely stumped. It's possible
I'm just connecting things wrong in IB. Thanks for any help.
Simon Slavin Guest
-
Cocoa: NSMatrix, change number of cells, can't target new ones
I have an NSMatrix of buttons. They work fine and the target is called when I click on one of them. I've set it up as just -... -
Single click vs double click in mouseDown and mouseUp
For a double click mouseDown and mouseUp catch 2 event: the first report clickCount value 1 and the second report value 2. How to respond to a... -
Datalist selects Item after first click, but does apply the SelectedItemTemplate after the second click only
Background: On my webform a simple datalist shows one column. The databind is done in the page_load event. In the ItemTemplate a linkbutton serves... -
setToolTip and NSMatrix of NSButton
What is wrong with this code: matrix_of_but is a NSMatrix of NSButton NSButton *but; but = ; ; CW report this error (for the last line) -
keyDown: in NSMatrix subclass
In <znu-55B7B3.11560309072003@news.fu-berlin.de> ZnU wrote: I presume you remembered to dick around with acceptsFirstResponder? When that...



Reply With Quote

