• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bindings questions on "ToDos" sample code.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Bindings questions on "ToDos" sample code. (From: George Lawrence Storm <email@hidden>)

  • Prev by Date: Re: Unable to programmatically add NSTabViewItem(s) to NSTabView
  • Next by Date: Re: Cocoa-dev Digest, Vol 1, Issue 166
  • Previous by thread: Bindings questions on "ToDos" sample code.
  • Next by thread: Unable to programmatically add NSTabViewItem(s) to NSTabView
  • Index(es):
    • Date
    • Thread