Re: NSCell mouse tracking best practices.
Re: NSCell mouse tracking best practices.
- Subject: Re: NSCell mouse tracking best practices.
- From: Matt Neuburg <email@hidden>
- Date: Sun, 09 Jul 2006 16:48:30 -0700
- Thread-topic: NSCell mouse tracking best practices.
On Fri, 7 Jul 2006 15:18:24 -0700, Corbin Dunn <email@hidden> said:
>Basically, if your trackMouse: event handles the mouseUp event, then
>you shouldn't have to add any code in NSTableView to do anything
>special. For NSBrowser and NSMatrix, the rules are different, and
>depend on the NSMatrixMode set for the matrix
Right, but that's exactly the problem. I *am* in an NSMatrix. So I'm none
the wiser. I banged around for three days, I finally found a way that I
could get called when the mouse went down and as the mouse moved around and
when the mouse went up, and I stopped. That way involved implementing one
method in my NSCell and another in my NSMatrix. It works. There might be
another way - though you still have not told me what it would be - but even
if there is, I never discovered it because, as I say, I stopped when I got a
positive result.
The real point here is the docs, which in my experience are particularly
vexing when it comes to NSMatrix, NSCell, and the interplay between them.
Cocoa is a framework; it is supposed to be there for the programmer to
*use*. If the rules are known, they should be stated in the docs. The rules
- *all* the rules - for what method calls an NSCell receives and when, in
all the various places it can live and in all the possible permutations of
its host's settings, should be spelled out. I don't have time to work out
all the secret "different rules" by banging my head against a black box
trying to reverse engineer it. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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