iphone - NSNumber Warning when using setter but code seems to work OK - Passing argument 1 makes integer from pointer without a cast -
I have an object Foo whose NSNumber property is declared as such:
< Code> @protect (retention) NSNM * SiteID; ; NSNumber * newNumber = [[NSNLLock] InitHathInt: 42]; MyFoo.siteID = new number; [New release number];
Assignment on line 3 run through a synthesized setter works just fine- myFoo.siteID contains the value that I expect to know about my business I am However, I get a warning:
'Set the argument of setSiteID to pass 1: Creates an integer without an indicator' I'm worried That I am doing something wrong and despite doing this assignment wrongly, everything is working fine.
I understand that the NSN arrears are irreversible and I have read some other questions, not to specify the price. If there is an existing topic that involves this matter or if I am missing some fundamental with the property declaration, apologies.
Thanks for any suggestions.
appreciate all suggestions and follow-up questions I feel like stupid I like a typo Where I was announcing with a different class, with which I was allocating. Those classes were very similar.
Old Foo * myFoo = [[Foo Alok] init];
Typo was difficult to meet with the name of very long class- posting with the exact code in self-completion hazard question and keeping the old code all around.
The old version of the class was also site id property, things were allocated with the new object and were declared with the old. Again - feeling silly this morning but I appreciate the help of everyone because I tried to track it down. At least I always have good tendency for careful warnings :).
Comments
Post a Comment