Re: Missing something about initialization
Re: Missing something about initialization
- Subject: Re: Missing something about initialization
- From: Dave DeLong <email@hidden>
- Date: Fri, 12 Jun 2009 11:16:27 -0700
You need the [super init] stuff in there.
Dave
On Jun 12, 2009, at 2:54 AM, Alfonso Ortega wrote:
I'm trying to parse a bit of html and use it to initialize an
object. I have very little background in objective-c, everything
parses correctly, I just can't seem to get the object initialized.
What am I doing wrong?
-(id)initWithNavcenRow:(NSString *)row
{
NSScanner *rowScanner = [NSScanner scannerWithString:row];
NSString *svnString;
NSString *prnString;
NSString *slotString;
[rowScanner scanUpToCharactersFromSet:[NSCharacterSet
capitalizedLetterCharacterSet] intoString:NULL];
[rowScanner scanUpToString:@"</td>" intoString:&plane];
[rowScanner scanUpToCharactersFromSet:[NSCharacterSet
decimalDigitCharacterSet] intoString:NULL];
[rowScanner scanUpToString:@"</td>" intoString:&slotString];
slot = [slotString intValue];
[rowScanner scanUpToCharactersFromSet:[NSCharacterSet
decimalDigitCharacterSet] intoString:NULL];
[rowScanner scanUpToString:@"</td>" intoString:&svnString];
svn = [svnString intValue];
[rowScanner scanUpToCharactersFromSet:[NSCharacterSet
decimalDigitCharacterSet] intoString:NULL];
[rowScanner scanUpToString:@"</td>" intoString:&prnString];
prn = [prnString intValue];
[rowScanner scanUpToCharactersFromSet:[NSCharacterSet
capitalizedLetterCharacterSet] intoString:NULL];
[rowScanner scanUpToString:@"</td>" intoString:&block];
[rowScanner scanUpToCharactersFromSet:[NSCharacterSet
capitalizedLetterCharacterSet] intoString:NULL];
[rowScanner scanUpToString:@"</td>" intoString:&clock];
return self;
}
_______________________________________________
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
_______________________________________________
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