>Yes, I see what you mean there. It looks suspicious without the rest
>of the code. Here is the entire method (without the logging)
>
>- (BOOL)scanUpToAndThenLeapOverString:(NSString*)stopString
> intoString:(NSString**)stringValue {
> [self scanUpToString:stopString intoString:stringValue] ;
> BOOL result = [self scanString:stopString intoString:NULL] ;
>
> return result ;
>}
>
>So you see I'm just passing that NSString** through in order to
>provide this handy addition to NSScanner. I've use this method "all
>over the place" with no trouble.
>
>And in this particular case, my invocation passes NULL for the second
>argument, and it logged as NULL (see original post), so I can't see
>how that value could be a problem.
I'm coming into this late, but are you positive you never accidentally pass in
NULL like so:?
[blah scanUpToAndThenLeapOverString:@"someString" intoString:NULL];
Try logging what comes in and see if you ever actually do pass in NULL.
- (BOOL)scanUpToAndThenLeapOverString:(NSString*)stopString
intoString:(NSString**)stringValue {
if (stringValue == nil)
{
NSLog("stringValue cannot be NULL!");
return NO;
}
[self scanUpToString:stopString intoString:stringValue] ;
BOOL result = [self scanString:stopString intoString:NULL] ;
return result ;
}
Good luck,
Cem Karan
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]