Saving NSObjectController info
Saving NSObjectController info
- Subject: Saving NSObjectController info
- From: <email@hidden>
- Date: Tue, 15 Feb 2005 9:28:53 +0000
Now, I'm sure this has been asked before, but before you all lay into me, I have done an exhaustive internet and mailing list search, including Malcom's site, to this and I'm still stumped.
I have a very basic doc-based application. I want to implement an NSObjectController to manage the model object it contains. Nothing fancy here, just a single object and nothing more.
I know how to set this all up. I've done the examples (CurrencyConverter with Bindings and all of that), that's not the issue. What I want to be able to do is give the user the ability to save the object information to disk in the form of an archived file. Now, my model object is already set up for this (NSCoding, yadda yadda), as well as MyDocument being able to save and retrieve the info from disk.
But where do I get the info from? Through the user interface, the values in each text field are stored in the model object instance that NSObjectController creates, but how do I programmatically get at that object instance so I can archive it and save it do disk, and subsequently unarchive it to open a file? Just some basic stuff, but I can find nothing. I did find one forum where this very question was asked (it was a MacAddict forum I believe) from 2003, but there was never an answer given. Any help you can give will be greatly appreciated.
James
_______________________________________________
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