Re: Cocoa Document-Based App v. Windows MDI App
Re: Cocoa Document-Based App v. Windows MDI App
- Subject: Re: Cocoa Document-Based App v. Windows MDI App
- From: Jeff Biggus <email@hidden>
- Date: Mon, 27 Jul 2009 00:57:14 -0500
On Jul 26, 2009, at 10:46 PM, David Blanton wrote:
I am the only Mac programmer where I work; the rest being windows.
I am constantly challenged to make Mac programs look like windows to
some extent.
Windows has an architecture called Multiple Document Interface.
Each doc opened is displayed in the same window 'frame' with a row
of tab controls at the top to select a document.
A Cocoa Document-Based App is one document one window ... multiple
windows.
How do I win the battle of 'too many windows floatin' around on the
Mac, we want everything in one window like windows!" ?
Can I use Safari tabs somehow?
While the full MDI way of doing things would be a bad thing on a Mac
for many reasons, simply having multiple documents per single NSWindow
is common in Cocoa apps, and there are two main ways that I see people
doing this: tabs across the top, like Safari; or a sidebar view down
the side, like Mail, iTunes, iChat, etc.
Starting with Leopard, the NSSplitView IB widget can be used to set up
the views and you can decide how to customize the look (it comes in
both vertical and horizontal flavors). You can also used the excellent
and flexible 3rd party solutions of RBSplitView and KFSplitView (which
are also more backward compatible). If you want it to look like Safari
tabs across the top you'll just have to do a little work to make that
top "bar" view behave how you want. Side tabs are much easier to get
up and running, and are often a better solution GUI-wise, depending on
your app.
There are many other ways to skin this cat too, but this is probably
the simplest, and it can look quite elegant.
jeff
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden