• 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
can't archive NSValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can't archive NSValue


  • Subject: can't archive NSValue
  • From: Ken Victor <email@hidden>
  • Date: Mon, 24 Apr 2006 14:01:59 -0700

the following raises an exception and prints a message on the console log:

[coder encodeObject: [NSValue valueWithPointer: [self controller]] forKey: @"controller"];

this is inside my encodeWithCoder: (NSCoder*) coder method. the message i get on the console is:

cannot encode (void *) value: <0013a6dc >

note that [self controller] returns a valid pointer. i've changed my code to use NSData instead so as not to be blocked...

according to the docs, NSValue adheres to NSCoding, so i believe my original code should have worked. did i do something wrong? or is this a bug? and if a bug, is this a framework bug or a doc bug?

thanx,
ken
_______________________________________________
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: can't archive NSValue
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: NSTokenField and drag 'n' drop
  • Next by Date: Re: Creating an instance of a subclass from a superclass initilization
  • Previous by thread: Re: Getting a table to resize columns. I'm doing everything right but it's not working?
  • Next by thread: Re: can't archive NSValue
  • Index(es):
    • Date
    • Thread