Re: Pop-Up Tabs and the Quest for a File Viewer
Re: Pop-Up Tabs and the Quest for a File Viewer
- Subject: Re: Pop-Up Tabs and the Quest for a File Viewer
- From: Brendan Younger <email@hidden>
- Date: Mon, 6 Aug 2001 02:41:07 -0500
On Wednesday, August 1, 2001, at 02:59 PM, David Adamson wrote:
Hello, all.
After a year of OOP brainwashing in Java atop a previous year of C++,
I've taken it upon myself to learn Cocoa and, in doing so, seek the
resurrection of the dearly missed pop-up-tabby-window-things. I've made
great progress, beginning small with file-associated windows spawned by
drag and drop, moving on to windows which miniaturize when another
gains main, coming and going at need, and finally truly beautifully
OOPy strategy-based miniaturization behaviour, so far including
docking, windowshades, and collapsing to the bottom (which is merely
windowshades with a y-constraint). It's this last bit I'm really proud
of, with dynamic switching of behaviours and completely overriding the
built-in way of miniaturizing in favor of something more friendly and
robust. But I ramble.
I come to you, O cocoa-delvers, in search of the One Thing truly
missing from my little toy, essential to its being functionial instead
of just pretty. A simple thing, perhaps, one that should, in the name
of interface consistency, be available as an off-the-shelf component,
but which I have yet to find. I seek a file-viewer/browser NSView
subclass, with support of dragging and dropping and view-changing and
Whatnot. Is there such a thing? Where can I find it, that code need not
be duplicated? Or should I just hunker down and do it myself, just for
the doing and learning if nothing else, and if I do it right it need
never be done again? Only I'd prefer to get this thing out the door
sometime soon...
Second, a much simpler question, is there any way that a dock-minimized
window icon can respond to drag and drop? I think not, but I'd love to
hear otherwise.
Thanks,
-David.
I have indeed come with my white sword of justice and truth brandished,
ready to fight the UI guidelines to their bloody death but come only to
find an elusive, non-existent entity. In short, I really don't know
precisely what you're looking for, but here's my best guess and
explanation.
A file browser NSView? Well, which one? NSOutlineView and NSBrowser
come to mind as worthy candidates, but you could also do some weird icon
view a la the OS 9 Finder. Either way though, and this is the beauty of
it all, you can keep your back-end logic for the file system completely
separate from the UI. The back-end stuff isn't too hard, but there are
some classes in MiscKit which can give you plenty of ideas (MiscFile).
Also, there are a few Apple examples which simply use the file system
for a data source.
As for the dock thing, I believe that it is not possible. Perhaps you
could ask someone at Apple for it?
Brendan Younger