• 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
How to implement NSBrowser -shouldSelectCell:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to implement NSBrowser -shouldSelectCell:?


  • Subject: How to implement NSBrowser -shouldSelectCell:?
  • From: Bill Cheeseman <email@hidden>
  • Date: Mon, 21 Jun 2004 08:29:34 -0400

As many have noticed over the years in the archives, NSBrowser leaves out a
lot of functionality we've grown accustomed to in NSTableView.

I now find myself in need of an NSBrowser analog of NSTableView's
-shouldSelectRow: delegate method. I'll call it -shouldSelectCell: or
-shouldSelectPath:. I need to prevent the user from selecting specific cells
(that is, specific paths), leaving the previous selection in effect without
flashing selection highlighting. I don't mind subclassing NSBrowser, if that
is what's required.

Any hints on how to do this? (Never mind how to implement a delegate method;
I know how to do that.) What I haven't figure out how to do is prevent a
click on a browser cell from being highlighted by the browser. NSBrowser's
-selectRow:inColumn: does not work for this purpose because it is not called
when the user clicks a cell. This fact is well covered in the archives.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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.


  • Follow-Ups:
    • Re: How to implement NSBrowser -shouldSelectCell:?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Computed Columns in NSTableView
  • Next by Date: Re: NSSearchField not calling target
  • Previous by thread: Re: Computed Columns in NSTableView
  • Next by thread: Re: How to implement NSBrowser -shouldSelectCell:?
  • Index(es):
    • Date
    • Thread