Hello,
how can i change the contents of an NSNumber object easily? Is there a setter for this? I've noticed that when i step through my code with the debugger it seems to happily accept the following lines of code, although it's obviously the wrong thing to do.
All i want to do is change the value from 100 to 200?
NSNumber *myInt1 = [NSNumber numberWithInt: 100];
NSNumber *myInt1 = [NSNumber numberWithInt: 200];
Apart the ability to store these objects in arrays, I'm struggling at the moment to see why they're used at all??. I guess there must be a purpose ,which for the moment is beyond me. However they're mentioned in all the good objective c books so I'm going to persevere.
how can i change the contents of an NSNumber object easily? Is there a setter for this? I've noticed that when i step through my code with the debugger it seems to happily accept the following lines of code, although it's obviously the wrong thing to do.
All i want to do is change the value from 100 to 200?
NSNumber *myInt1 = [NSNumber numberWithInt: 100];
NSNumber *myInt1 = [NSNumber numberWithInt: 200];
Apart the ability to store these objects in arrays, I'm struggling at the moment to see why they're used at all??. I guess there must be a purpose ,which for the moment is beyond me. However they're mentioned in all the good objective c books so I'm going to persevere.