- (GDataQuotaProperty *)quota;
- (void)setQuota:(GDataQuotaProperty *)val;
Implemented as follows:
- (GDataQuotaProperty *)quota {
return [self objectForExtensionClass:[GDataQuotaProperty class]];
}
- (void)setQuota:(GDataQuotaProperty *)val {
[self setObject:val forExtensionClass:[GDataQuotaProperty class]];
}
As documented in GDataObject.h (and I've been working off of GDataServiceGoogleCalendar, GDataEntryCalendar, and GDataFeedCalendar as a reference implementation), in the GDataBaseEntry subclass I've addExtensionDeclarations as follows:
- (void)addExtensionDeclarations {
[super addExtensionDeclarations];
Class entryClass = [self class];
// User extensions
[self addExtensionDeclarationForParentClass:entryClass
childClasses:[GDataQuotaProperty class], nil];
}
However, when I try to call the quota method as follows in my callback:
GDataTextConstruct *titleTextConstruct = [user title];
NSString *title = [titleTextConstruct stringValue];
GDataQuotaProperty *quotaConstruct = [user quota];
NSString *quota = [quotaConstruct stringValue];
I get an exception and this error:
2012-11-19 12:42:22.667 Google Apps Open Directory Sync[47679:903] -[GDataEntryBase quota]: unrecognized selector sent to instance 0x2836d0
In the above example I do get the user's name back correctly without error. So, what am I missing here?
As mentioned, I've been comparing with the Service/Feed/Entry implementation for Calendar (specifically the accessLevel & color elements and methods) and am just not seeing what I'm missing.
Thanks in advance for any assistance you can provide.
Entry classes can specify the "kind" that identifies the class in the XML. For example, some APIs use category elements in the XML:+ (NSString *)standardKindAttributeValue { return @"calendar#calendar"; }@implementation GDataEntryDrawingDoc+ (void)load { [self registerEntryClass]; }+ (NSString *)standardEntryKind { return @"http://schemas.google.com/docs/2007#drawing"; }@end
and some use kind attributes:
@implementation GDataEntryCalendar
+ (void)load { [self registerEntryClass]; }
@end