+class
+class
- Subject: +class
- From: Keith Bauer <email@hidden>
- Date: Thu, 13 Feb 2003 10:23:14 +1300
I'm having strange problems with +class. The following code causes
this error:
warning: invalid receiver type `struct _objc_class *'
warning: passing arg 1 of pointer to function from incompatible pointer
type
----
@interface Element : NSObject
...
@end
@interface Element (XMLLoading)
...
@end
@interface DocumentElement : Element
...
@end
@interface DocumentElement (XMLLoading)
...
- (void)appendChild:(id)child;
@end
@implementation DocumentElement (XMLLoading)
...
- (void)appendChild:(id)child
{
Class elementClass = [Element class];
...
}
@end
----
I can happily use DocumentElement or NSString in place of Element in
the call to +class. I've checked the preprocessor output to make sure
that I don't have any macros causing funny problems or anything.
What's particularly strange is that the same code works in another
file. I'm baffled.
Any ideas?
Thanks,
Keith
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.