Re: Help with detecting invalid object when in if() test....
Re: Help with detecting invalid object when in if() test....
- Subject: Re: Help with detecting invalid object when in if() test....
- From: lbland <email@hidden>
- Date: Fri, 15 Aug 2003 15:17:28 -0400
On Friday, August 15, 2003, at 01:34 PM, Steven M.Palm wrote:
Correction to the last message...
NSLog(@"sig = %d, %@", sig, sig);
I get this consistently when it's bad.
sig = -1609366696, null
Yet a comparison to NULL, nil, or even [NSNull null] doesn't match.
Hmmm....
On Friday, August 15, 2003, at 01:46 PM, Steven M.Palm wrote:
if ([sig isEqualTo:NULL])
Actually, I need more sleep... That didn't work either, however, this
did....
([sig isEqualTo:[NSNull null]])
What a brain block, and for something so simple.
hi-
on my computer...
printf("[NSNull null]: %d\n", [NSNull null]);
gives this:
[NSNull null]: -1609366696
printf("[[NSNull null] class]: %d\n", [[NSNull null] class]);
gives this:
[[NSNull null] class]: 433168
NSLog(@"[NSNull null]: %@ \n", [[NSNull null] class]);
gives this:
2003-08-15 15:15:21.127 test[752] [NSNull null]: NSNull
... which I never knew. Learn something new every day. Does that
explain it? Thanks for bringing that up.
Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.