• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to implement NSBrowser -shouldSelectCell:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >How to implement NSBrowser -shouldSelectCell:? (From: Bill Cheeseman <email@hidden>)
 >Re: How to implement NSBrowser -shouldSelectCell:? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: How to implement NSBrowser -shouldSelectCell:?
  • Next by Date: Re: NSButton behavior [weirder]
  • Previous by thread: Re: How to implement NSBrowser -shouldSelectCell:?
  • Next by thread: Sleeping and waking NSThread
  • Index(es):
    • Date
    • Thread