Re: NSCell mouse tracking best practices.
Re: NSCell mouse tracking best practices.
- Subject: Re: NSCell mouse tracking best practices.
- From: Corbin Dunn <email@hidden>
- Date: Mon, 10 Jul 2006 09:56:05 -0700
On Jul 9, 2006, at 4:48 PM, Matt Neuburg wrote:
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.
What is your NSMatrixMode set to on the NSMatrix? I will gladly
provide more insight for the future, and attempt to help make the docs
better.
Let me get it straight what you are trying to do:
You want the mouse down to track inside your cell, and when the mouse
is moved out you do (or do not?) want it to start tracking another
cell, or still maintain tracking in the original mouse-down cell?
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.
yes -- I understand. It sounds like what you are looking for is
clarification of the way NSMatrixMode works. We can help clarify that.
-corbin
_______________________________________________
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