Re: Document based apps & tabbed windows?
Re: Document based apps & tabbed windows?
- Subject: Re: Document based apps & tabbed windows?
- From: Seth Willits <email@hidden>
- Date: Tue, 17 Apr 2007 09:54:37 -0700
On Apr 17, 2007, at 7:43 AM, Jerry Krinock wrote:
Still looking for feedback before I make a decision. Thanks!
Make sure you take a long-term view, including all the little
details that the document architecture gives you....for example:
Yes, this is important. In my case.......
Save As
I used the stock one for free. Yay.
View of the document path shown when command-clicking the title bar
"Dirty" dot in close box
I'm also getting these for free. Though they're simple calls.
setRepresentedFilename:, setDocumentEdited:
Open Recent menu
I had to write my own Open Recent menu in order to get sorting
between two document styles, so I unfortunately didn't save anything
here. I also need to manage the recent documents list myself so that
it remembers n documents of each document type rather than n
documents in total. Getting the path portions of the recent menu
items to look and behave like the default ones took a while, but it
only took a few hours to get it all working.
Warning sheet when closing a dirty document (Don't Save, etc.)
Warning when quitting "You have 4 documents with unsaved
changes..."
etc.
These I had to customize to account for handling multiple documents.
For example, when you close a window with multiple unsaved documents
in it, you can't display the standard warning sheet for the current
document, you have to display one saying there are _multiple_ unsaved
documents and would you like to review them. Then when you review
them, a Save All dialog appears for them etc. Also if they're unsaved
you need to display a warning dialog that you're closing a window
with multiple documents as well. There are also some more scenarios
that change things. Plus, the unfortunate thing is that almost all of
the save messages get sent to the _document_ yet you really want them
to be sent to the document's _controller_. So that muddies things up
as well. Getting it all to work the way I needed took 450 lines of
code and I had to rewrite it several times because there are 19
different methods in play.
Finally, is that tabbed multi-document window "look" really worth
all the extra effort?
It's not about a look, it's about functionality, and for me it was
worth it.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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