• 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: Array Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array Problems


  • Subject: Re: Array Problems
  • From: Serge Meynard <email@hidden>
  • Date: Sun, 10 Apr 2005 14:30:58 -0400

On Apr 10, 2005, at 13:58, David Rocamora wrote:
I'm pretty new to Cocoa and Objective-C so I imagine this problem is
pretty easy to solve for an expert, but I am stumped.  I have a
document based program that needs to save a NSMutableArray of objects
to a file using NSArchiver. Everything is compiling without errors or
warnings and when I run the program it appears to be saving. When I
load the data back from the file It only has one entry in the array.
This entry also does not contain any of the changes that were made to
it.

My first thoughts were that the array was somehow not having anything
added to it. So I used an NSLog to display the contents of the array
in every method that did something to the array. The correct data is
in all of the methods I wrote (as well as init), but not in methods
like dataRepresentationOfType or dealloc.

I hope someone has some pointers to help me figure this out.

Thanks in advance,
Dave

It might help if you posted the significant sections of your code... How are you doing the load and save exactly?


By the way, you should probably be using NSKeyedArchiver instead of NSArchiver.


_______________________________________________ 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: Array Problems
      • From: David Rocamora <email@hidden>
    • Re: Array Problems
      • From: David Rocamora <email@hidden>
References: 
 >Array Problems (From: David Rocamora <email@hidden>)

  • Prev by Date: Array Problems
  • Next by Date: Re: NSView, scrolling colorWithPatternImage
  • Previous by thread: Array Problems
  • Next by thread: Re: Array Problems
  • Index(es):
    • Date
    • Thread