Re: Do I need a document-based application ?
Re: Do I need a document-based application ?
- Subject: Re: Do I need a document-based application ?
- From: Rush Manbert <email@hidden>
- Date: Wed, 08 Mar 2006 17:17:36 -0800
Wayne Pascoe wrote:
Hi all,
I'm trying to write an application to allow me to easily find archived
media. The end result will have a screen displaying the archives and a
description of each archive in the main window. Double clicking the
archive will open another window displaying a lot of metadata about the
archive, as well as where it currently is.
Adding a new archive will also have another window for the user to
enter details about the archive.
Do I need a document-based application to do this? I'm only just
getting started and I'm heavily reliant on cocoa programming for Mac OS
X at the moment. Looking through this, I'm still a LOT confused about
how to have an application with multiple NIB files (which I assume that
I will need for multiple windows in the application) and tying that all
together.
If anyone could offer any pointers to tutorials that show how to create
a multi-document application that uses core data, I would be very
grateful. I've read some of the linked documentation at http://
developer.apple.com/documentation/Cocoa/Conceptual/CoreData/ index.html,
but I'm still not clear as to how I would go about accessing the same
data in multiple classes / nibs.
Thanks in advance!
If you read chapters 9 and 10 in the book ("Nib Files and
NSWindowController" and "User Defaults") and pay careful attention to
the part in chapter 9 where he explains about the "File's Owner" object,
it gives you pretty much everything you need to know in order to make a
multi-windowed app that is not document based. Once you've made your
preferences controller it's pretty easy to generalize the concepts to
any other type of controller.
I used this because I was creating a custom browser that needed to open
multiple windows, but the windows don't represent "documents" in the doc
architecture sense. It worked out very well, just by extrapolating from
the book examples.
You will need to consider whether the characteristics of your
application fit the document-based application architecture. If so, then
by all means use it. But if not, it's really not too hard to do it the
other way.
Good luck,
Rush
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden