• 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: Displaying a particular path in an NSBrowser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying a particular path in an NSBrowser?


  • Subject: Re: Displaying a particular path in an NSBrowser?
  • From: Brock Brandenberg <email@hidden>
  • Date: Wed, 12 Feb 2003 00:41:49 -0600

> OK; progress (of a sort). I went back and tried calling setPath (I had
> tried this earlier, but stopped because of confusing results).
>
> Anyway, if I call setPath on start-up and DON'T have
> browser:willDisplayCell:atRow:column: call selectRow:inColumn: with
> the
> next path element, the entire path displays. Huzzah! Now I just need
> to find a place to shoehorn in the proper action when the user actually
> clicks on a new directory...

You shouldn't be calling selectRow:inColumn: from within the notification
method. Bad usage. You should only be providing the text for the browser
cell, leaf status and any other visual state information in this method. You
are interrupting the normal flow of operation by interjecting a
selectRow:inColumn: message.

To act on a click, set a target action for your NSBrowser. It doesn't have a
notification for a selection change like a NSTableView does, so just use an
action method and then query the state of the browser with selectedColumn,
selectedRowInColumn, etc.

Brock Brandenberg

----- industrial design @ www.bergdesign.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.

  • Follow-Ups:
    • Re: Displaying a particular path in an NSBrowser?
      • From: Scott Anguish <email@hidden>
  • Prev by Date: The location of the document "<name>" cannot be determined
  • Next by Date: Re: Communication with StartupItem
  • Previous by thread: Re: Displaying a particular path in an NSBrowser?
  • Next by thread: Re: Displaying a particular path in an NSBrowser?
  • Index(es):
    • Date
    • Thread