Re: Displaying a particular path in an NSBrowser?
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.