Re: How to implement NSBrowser -shouldSelectCell:?
Re: How to implement NSBrowser -shouldSelectCell:?
- Subject: Re: How to implement NSBrowser -shouldSelectCell:?
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 21 Jun 2004 09:13:15 -0600
On Jun 21, 2004, at 8:56 AM, Nick Zitzmann wrote:
3. Override -mouseDown: in the matrix and call
-getRow:column:forPoint: to figure out where the user clicked. Then
you can send a -browser:shouldSelectInRow:column: (or whatever)
message to the NSBrowser's delegate. You probably know what to do from
there...
Correcting myself: -getRow:column:forPoint: should always return 0 for
the column if the user clicked on a cell, since each individual matrix
in a browser has only one column. So in your matrix subclass, you'd
have to store the browser's column as an integer in the matrix, and
then write some way of passing this information into each matrix.
Again, this can be easily done if your browser uses an active
delegate... If you're not using an active delegate, you might wish to
consider switching to one, since it gives you just a little bit more
flexibility.
Nick Zitzmann
<
http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.