• 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: Problems using -writeToFile:atomically: from a NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems using -writeToFile:atomically: from a NSMutableArray


  • Subject: Re: Problems using -writeToFile:atomically: from a NSMutableArray
  • From: George Lawrence Storm <email@hidden>
  • Date: Mon, 25 Oct 2004 01:03:05 -0700

In response to Scott Stevenson / Sat Oct 23 06:02:03 2004

My guess is that your dictionary contains something other than basic Foundation objects. Other than that, it's not clear what's wrong. Try simplifying the application by just making an array with a single dictionary with a single/key value pair at a hardcoded location. If that works, continuing adding stuff back in until you know exactly what condition makes it fail.

I did some additional tracing, it turns out you were correct in that one of the NSTableView cell's data being returned is not returning a basic Foundation object. Instead it appears to be returning a reference to the popup objects item controller (which is an NSObject referenced from the popups NSArrayController).

Is there a call I can override in this NSObject (Controller) to return a basic Foundation object (in this case an integer) when saving the dictionary it is part of as an XML, or do I have to create my own archiving mechanism?
(When saving as XML it is saving an array of dictionarie(s) which in turn holds the data in question.)

Although this program is only being used to save an XML, for future reference I probably should ask can it also be converted to read from the XML as well?

-----

George Lawrence Storm
Macintosh Applications Development
Snohomish (Seattle), Washington
E-mail: <email@hidden>
_______________________________________________
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
  • Follow-Ups:
    • Re: Problems using -writeToFile:atomically: from a NSMutableArray
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: key codes
  • Next by Date: [newbie]: resizing a view
  • Previous by thread: Re: Problems using -writeToFile:atomically: from a NSMutableArray
  • Next by thread: Re: Problems using -writeToFile:atomically: from a NSMutableArray
  • Index(es):
    • Date
    • Thread