Skip navigation.
 
mlRe: Cocoa coding style with multiple NSTableViews in a NSApplication
FROM : Guy English
DATE : Thu Dec 23 22:13:29 2004

On Thu, 23 Dec 2004 00:11:07 -0500, Charlton Wilbur <<email_removed>> wrote:
> I have a window with many tab views in it, and each of those tab views
> can conceivably have multiple tables in it. [...]
>  Is there a way to put an NSTabViewItem in a nib file, and load
> it individually?  Or really any other sort of NSView subclass?


You can do it like we did in the old days - before tab views.

Put each tab view item in its own nib with it's own controller object.
The files owner is either your application controller or the window
controller for the window holding the tab view.

When you load your tab view - load up all the nibs for each page and
connect their top views to the content view of the tab view.

Actually - what I used to do was different - I'd have a popup button
centered in a window and a box below it. When the user made a
selection from the popup you load the corresponding nib into the box's
content view.

This was really common when 'Inspectors' were the rage. It was nice
because you could easilly dynamically expand your UI with inspector
plugins. Each plugin held it's name and the could be loaded
dynamically.

Anyway, I'm rambling on a side point here I think.

Later,
Guy