On Wednesday, February 12, 2003, at 06:41 PM, Rich Morin wrote:

I have my browser's plumbing working, but I found myself doing some
peculiar things.  I'm hoping that one of you can tell me wazzup.
I've put together a sample app showing how to use NSBrowser with CB. A few notes about it:

It's fully keyboard-navigable - i.e. you can tab between the text field and the browser - if you turn on "Full Keyboard Access" under the keyboard pane in System Preferences.

When you're typing in the path text field, updates to the browser are "live" - that is, the browser selection is updated to reflect your typing with every keystroke. Likewise, the text field is updated with every change in browser selection.

Everything that could be done in Interface Builder, was. Thus, you'll see no setTarget(), setAction(), or setDelegate() calls.

Delegation is used rather than notifications.

A bare minimum of information - the filename and owner - is displayed about the selected file/folder - I had to leave *something* for Rich to do, after all. I wouldn't want him to get bored. ;-)

This example will be included in the next version of CB. Until then, you can download it from my site:

<http://www.dot-app.org/BrowserSample.tgz>

sherm--

C programmers never die - they're just cast into void.



Reply via email to