Let's say I have something like this:
Why can't I do something like:
to get a Bar**? It's really annoying since I'll have methods that want a double pointer (like a char ** or some custom double pointer), but I can't just directly go "&[someFoo object]" to get a double pointer out of an object. Instead, I have to do something ugly like:
because
gives all sorts of ugly lvalue compile error messages.
Code:
@interface Foo : NSObject {
Bar *object;
}
- (Bar *) object;
@end
@implementation Foo
- (Bar *) object {
return object;
}
@end
Why can't I do something like:
Code:
&[someFoo object]
Code:
Bar *temp;
temp = [someFoo object];
blah( &temp );
[someFoo setObject:*temp];
Code:
blah( &[someFoo object] );