Re: Bindings questions on "ToDos" sample code.
Re: Bindings questions on "ToDos" sample code.
- Subject: Re: Bindings questions on "ToDos" sample code.
- From: Scott Stevenson <email@hidden>
- Date: Tue, 19 Oct 2004 20:48:01 -0700
On Oct 19, 2004, at 2:31 PM, George Lawrence Storm wrote:
All my data fields are defined in my "ToDos" NSArrayController (in MyDocument.nib) and otherwise is defined nowhere in my code (other than its associated array being used whole for storage/retreval and each record in whole being accessed through MyDocument).
If I am correct in my data fields being defined in my "ToDos" NSArrayController how does it know what data type(s) to store and what is it actually storing?
When you say data fields, do you mean the "keys" table in Attributes Inspector for the NSArrayController?
If the keys are only defined in IB and not in code, the result is an array of MSMutableDictionaries which have key/value pairs for any data that has been entered via the UI.
If I can figure this out my next step will be to convert this example to use XML for its storage. To do that I assume I will not be able to use this model of only defining my data fields in my .nib file.
It doesn't matter since you're just using foundation objects.
You can probably just use NSArray's -writeToFile:atomically: and -initWithContentsOfFile: to do what you need. I *think* this writes out the contents in XML format, but it might be the NeXT-style plist format.
- Scott
--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
_______________________________________________
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