Mikuro
Crotchety UI Nitpicker
Hi. I need some advice on how to get pointers to numbers stored in an NSNumber, which in turn is stored in an NSDictionary (not that that matters, I guess). I'm not sure of a good, reliable way to do it. It seems that "(x+2)", where x is a pointer to an NSNumber, works, but...it seems awfully un-Cocoa-ish.
So, do you think this is a safe way to do it? And is there nothing stopping me from "manually" manipulating the value of the NSNumber like so:
*((unsigned int*)x+2)=2345;
It seems to me like if it were that simple, there'd be NORMAL ways to do it. Am I setting myself up for disaster by trying to go low-level on Cocoa objects?
So, do you think this is a safe way to do it? And is there nothing stopping me from "manually" manipulating the value of the NSNumber like so:
*((unsigned int*)x+2)=2345;
It seems to me like if it were that simple, there'd be NORMAL ways to do it. Am I setting myself up for disaster by trying to go low-level on Cocoa objects?