Tracking behavior of cells in NSMatrix
Tracking behavior of cells in NSMatrix
- Subject: Tracking behavior of cells in NSMatrix
- From: Ricky Sharp <email@hidden>
- Date: Sun, 21 Nov 2004 22:00:05 -0600
As some of you may already know, I've been struggling to get a custom
button class working. I've finally worked out a solution that gives me
push, radio and switch type of buttons. Rendering, accessibility, and
other features I needed are now all a-ok.
But, there's now a new problem dealing with my cells being inside an
NSMatrix (e.g. a group of radio buttons).
My button & cell are derived from NSControl and NSCell respectively.
Previously, I had derived from NSButton and NSButtonCell. But that led
to numerous issues that I won't get into now.
Anyhow, when my cells are within an NSMatrix set to mode of "radio", I
don't get the correct tracking behavior. For example, take this set of
radio buttons:
(*) A
( ) B
If the mouse goes down on "A", it does highlight correctly. But as I
move the mouse around, it will highlight whatever radio button cell is
under the cursor.
When my cell derived from NSButtonCell, this didn't occur. The cell
that was initially hit with the mousedown was the only cell that would
be tracked.
Is the solution to override trackMouse:inRect:ofView:untilMouseUp:? If
so, what would be the basic pseudo code?
Or, is there some "behind the scenes" connection between NSMatrix and
NSButtonCell that provides this special tracking behavior? Should I
subclass NSMatrix instead to provide the behavior I want?
TIA,
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden