Reputation: 115
I declare "extern NSDate *chooseDate" in my "global.h" file. I include this file in my "blueview" and in blueview I add the line "NSDate *chooseDate = YES". I get the warning message as shown in the title. I have read up on this, and I understand that the warning is saying that I am trying to assign an object to an integer. The part I don't get is that I am declaring chooseDate as an NSDate in both files. I don't understand how either is an integer. The funny part is that my program works correctly, I am just trying to get rid of this warning. Any help would be greatly appreciated.
Upvotes: 0
Views: 388
Reputation: 237040
You're reading the error backwards: It says you're trying to assign an integer to an object variable. So you're correct that the variable is an object pointer, but YES
is not a pointer to an NSDate object, it is a BOOL value (which is a kind of integer).
Upvotes: 4