objective c id *
Posted
by joels
on Stack Overflow
See other posts from Stack Overflow
or by joels
Published on 2010-03-08T22:43:45Z
Indexed on
2010/03/08
22:51 UTC
Read the original article
Hit count: 410
I am using the KVO validations in my cocoa app. I have a method
- (BOOL)validateName:(id *)ioValue error:(NSError **)outError
My controls can now have their bindings validate. How do I invoke that method with a id *
NOT id
To use the value that is passed in (a pointer to a string pointer) I call this:
NSString * newName = (NSString *)*ioValue;
if ([newName length] < 4) {
otherwise i get bad exec crashes...
passing in with type casting doesnt work: (id *)myStringVar
passing in with a regular id doesnt work either : (id) myStringVar
© Stack Overflow or respective owner