• 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: quick and dirty NSData implosion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick and dirty NSData implosion


  • Subject: Re: quick and dirty NSData implosion
  • From: jon <email@hidden>
  • Date: Fri, 08 May 2009 08:35:30 -0600

in the debugger,  here are the last lines it followed...

#0 0x91b35de9 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
#1 0x91b35b07 in -[NSMenu performKeyEquivalent:]
#2 0x91b343ac in -[NSApplication _handleKeyEquivalent:]
#3 0x91a5116b in -[NSApplication sendEvent:]
#4 0x919ae69f in -[NSApplication run]
#5 0x9197b8a4 in NSApplicationMain
#6 0x0000210c in main at main.m:5


with your code below i get this if i use NSData line in place of the defaults line... (the thing that was blowing up)

NSData blew up because: *** -[BookMark encodeWithCoder:]: unrecognized selector sent to instance 0x1f900a40

so this appears to be that my bookmark class does not have something in it that NSData needs? or that i'm using property and synthesize ?

here is the class. it appears that I need to do something to prepare it for NSData?

#import <Cocoa/Cocoa.h>

@interface BookMark : NSObject
{
    int bookMarkCount;
    NSString *bookMarkurlString;
	NSString *bookMarkTitle;
}

@property(readwrite, assign) int bookMarkCount;
@property(readwrite, assign) NSString *bookMarkurlString;
@property(readwrite, assign) NSString *bookMarkTitle;

@end


#import "BookMark.h"

@implementation BookMark

@synthesize bookMarkCount;
@synthesize bookMarkurlString;
@synthesize bookMarkTitle;

@end



On May 8, 2009, at 8:04 AM, John Cebasek wrote:

Why don't you do something like this:

@try
{
NSData *bookMarkdata = [NSKeyedArchiver archivedDataWithRootObject:bookMarkList];
//   [defaults setObject:bookMarkList forKey:PECBookMarkListKey];
}
@catch (NSException *e)
{
	NSLog(@"NSData blew up because: %@", [e reason]);
}

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: quick and dirty NSData implosion
      • From: Graham Cox <email@hidden>
    • Re: quick and dirty NSData implosion
      • From: Alexander Spohr <email@hidden>
    • Re: quick and dirty NSData implosion
      • From: Dave DeLong <email@hidden>
References: 
 >quick and dirty NSData implosion (From: Jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: Alexander Spohr <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: John Cebasek <email@hidden>)

  • Prev by Date: RE: Distributed Objects via Bonjour?
  • Next by Date: Re: quick and dirty NSData implosion
  • Previous by thread: Re: quick and dirty NSData implosion
  • Next by thread: Re: quick and dirty NSData implosion
  • Index(es):
    • Date
    • Thread