First off, NSInteger is an object not an int and can't be directly compared to an int. Second, i is not likely an NSInteger, it's a pointer to an NSInteger, which means it can be compared to an int, via implicit or explicit casting, but in the absence of an explicit cast, the compiler assumes that's probably not what you intended to do.
Next, NSNull & NSNumber are distinct types; the ternary operator wants both potential returns to be of the same type (or "compatible" types for some meaning of "compatible"), so the compiler will warn you about that once you fix the first problem. Just cast both to id and you'll be fine--assuming the code that receives this id properly handles the fact that it may point to different types. I started to say this is all basic C stuff, but that's not quite fair. It's the intersection of Objective-C extensions with the basic C rules, which still hold true. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]