diff --git a/ChangeLog b/ChangeLog index edb171417..c4363bd4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-04-19 Wolfgang Sourdeau + * OpenChange/MAPIStoreObject.m (-getProperty:withTag:): compute + the method selector and pass it as argument to the IMP of the + property getter, as would be with any regular method invocation. + * OpenChange/MAPIStoreMailMessage.m (-getPrBody:): no longer check the size of the returned content, as streams are now handled internally by OpenChange. diff --git a/OpenChange/MAPIStoreObject.m b/OpenChange/MAPIStoreObject.m index d90a0c097..f97014007 100644 --- a/OpenChange/MAPIStoreObject.m +++ b/OpenChange/MAPIStoreObject.m @@ -218,23 +218,31 @@ static Class NSExceptionK, MAPIStoreFolderK; { MAPIStorePropertyGetter method = NULL; uint16_t propValue; + SEL methodSel; const char *propName; int rc = MAPISTORE_ERR_NOT_FOUND; - + propValue = (propTag & 0xffff0000) >> 16; + methodSel = MAPIStoreSelectorForPropertyGetter (propValue); + method = (MAPIStorePropertyGetter) classGetters[propValue]; if (method) - rc = method (self, NULL, data); + rc = method (self, methodSel, data); else { - propName = get_proptag_name (propTag); - if (!propName) - propName = ""; *data = NULL; - [self warnWithFormat: - @"unimplemented property: %s (0x%.8x) in class '%@'", - propName, propTag, NSStringFromClass (isa)]; + if (methodSel) + { + propName = get_proptag_name (propTag); + if (!propName) + propName = ""; + [self warnWithFormat: + @"unimplemented selector (%@) for %s (0x%.8x)", + NSStringFromSelector (methodSel), propName, propTag]; + } + else + [self warnWithFormat: @"unsupported property tag: 0x%.8x", propTag]; } return rc;