Re: Bindings, TableViews, and saving...
Re: Bindings, TableViews, and saving...
- Subject: Re: Bindings, TableViews, and saving...
- From: Scott Anguish <email@hidden>
- Date: Tue, 27 Jul 2004 00:38:12 -0400
On Jul 26, 2004, at 10:56 PM, James McConnell wrote:
Hey all, I'm working on a fairly common project where I have a table
view
using an NSArrayController to handle custom model objects. I can hook
up
all the bindings correctly like in the tutorials, but what I'd like to
be
able to do is to take the information from the TableView and save it
to disk
as a custom file type. How would I go about this? It's not a
doc-based
app, so the process of saving is specific to what kind of info the app
contains (it's a bootleg manager application). So I'd like to be able
to
save the entire contents of the table to disk, and then of course load
them
back up when the file is opened within the application.
Could someone point me to a tutorial or something online that goes over
this? I have a feeling I'm missing something rather basic, but I
can't see
it. I'll keep looking myself and if I find my own answer (which could
very
well happen), I will let you know. Thanks!!!
Bindings doesn't handle any of the archiving for you. It's your
responsibility to hook a Save menu item up to the appropriate action
method, and then archive the object that is the contentArray for your
array controller.
You get much of this for free if you use an NSDocument based app, but
it's still your responsibility to write the saving code.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.