Amazon.com Widgets EXC_BAD_ACCESS with Super init?
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 18, 2013, 09:28:06 AM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Help!!!
| | |-+  EXC_BAD_ACCESS with Super init?
Pages: [1]   Go Down
Print
Author Topic: EXC_BAD_ACCESS with Super init?  (Read 486 times)
brasilcaps
Newbie
*
Posts: 2


Email




« on: February 07, 2010, 02:29:04 PM »

Code: (Objective-C)
@implementation Playlist: NSObject

-(id) initWithName: (NSString *) theName
{
self = [super init];

if(self){
playlistName = [[NSString alloc] initWithString: theName];
playlist = [[NSMutableArray alloc] init];
}

return self;
}

For some reason that self super init code gives me EXC_BAD_ACCESS error. Any ideas?
Logged
esc
Global Moderator
Full Member
*****
Posts: 230






« Reply #1 on: February 07, 2010, 02:55:37 PM »

Try removing the ":NSObject" from the implementation line:

@implementation Playlist: NSObject 
Logged
brasilcaps
Newbie
*
Posts: 2


Email




« Reply #2 on: February 09, 2010, 10:40:52 AM »

Thanks!!!!!! That was it!
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.