• 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: Unarchive consistency errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unarchive consistency errors


  • Subject: Re: Unarchive consistency errors
  • From: Sam Thorne <email@hidden>
  • Date: Sun, 25 Apr 2004 21:16:17 +0100

Hi Prachi,

Thanks for the reply,

[coder encodeObject:codeView]; // NSMutableArray
codeView isn't too suspicious :-) it's just an array that holds objects for an NSTableView elsewhere in the app (the objects being "code snippet" strings, hence the name).

I did notice in the apple documentation that if the unarchiver doesn't know about a class it will return an exception, so i added the header for the objects that get stored in the codeView to the class that does the unarchiving, but to no avail.

Also, have you looked into using keyed archives? They're really similar to what you have, but you encode each object with a key, and the order of encoding/decoding isn't important. From Apple, "Keyed archives are the preferred archive type in Mac OS X version 10.2 and later."

I suppose I might try key archiving, but it just seems odd that this isn't working when there doesn't appear to be anything out of place, and I'd like to know why.
No doubt it will be something really obvious...

Have you tried using the debugger? Just set it to break on [NSException raise] (in the Breakpoints window of the Debugger). Try encoding/decoding and see where the inconsistency occurs.

I did try setting [NSException raise] and running in debug mode, but nothing happened...I'm not sure if I'm putting it in the right place though.
I clicked the breakpoints toolbar icon in debugger, clicked the "New Breakpoint" button in the window that appeared and added [NSException raise], which appeared under a toggled heading of "Symbolic Breakpoints".
Am I putting it in the right place?

Thanks for any help!
--
Sam

So long, and thanks for all the fish.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • RE: Unarchive consistency errors
      • From: "Jonathan E. Jackel" <email@hidden>
References: 
 >Unarchive consistency errors (From: Sam Thorne <email@hidden>)
 >Re: Unarchive consistency errors (From: Prachi Gauriar <email@hidden>)

  • Prev by Date: Re: Java_com_apple_cocoa_application_NSText_scrollRangeToVisible
  • Next by Date: Re: Files owner vs MyController
  • Previous by thread: Re: Unarchive consistency errors
  • Next by thread: RE: Unarchive consistency errors
  • Index(es):
    • Date
    • Thread