I'm suddenly getting this warning NSScanner: nil string argument
in the debug window.
I say suddenly, but I've no idea from which code has caused it.
How do I resolve this problem ?
I'm suddenly getting this warning NSScanner: nil string argument
in the debug window.
I say suddenly, but I've no idea from which code has caused it.
How do I resolve this problem ?
You check if the string is nil before creating the NSScanner with it, as you are probably creating it with
+ (id)scannerWithString:(NSString *)aString
or
- (id)initWithString:(NSString *)aString
There is no way of changing the NSScanner string, once it has been created, the compiler is just telling you that it is pointless to create a NSScanner with a nil string.
I had solved this problem by removeObserver:forKeyPath:
in dealloc
where I had used KVO.