aboutsummaryrefslogtreecommitdiff
path: root/AddressBook
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-07-24 20:30:18 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-07-24 20:30:18 +0000
commitc980db4e60639ce7ae9443195a4f9b2b4b449351 (patch)
treea75513a764a370721b3e04faa084f100ac559de0 /AddressBook
parentba6b64fef26412fd664e22862d10d636194f8c75 (diff)
[Author: dmaclach]
Clean up all of our format string issues amongst some other fun stuff. R=thomasvl DELTA=167 (90 added, 8 deleted, 69 changed)
Diffstat (limited to 'AddressBook')
-rw-r--r--AddressBook/GTMABAddressBook.m17
-rw-r--r--AddressBook/GTMABAddressBookTest.m2
2 files changed, 17 insertions, 2 deletions
diff --git a/AddressBook/GTMABAddressBook.m b/AddressBook/GTMABAddressBook.m
index 6aa55e4..77d194d 100644
--- a/AddressBook/GTMABAddressBook.m
+++ b/AddressBook/GTMABAddressBook.m
@@ -595,11 +595,19 @@ typedef struct {
}
- (NSString *)description {
- return [NSString stringWithFormat:@"%@ %@ %@ %d",
+#if GTM_IPHONE_SDK
+ return [NSString stringWithFormat:@"%@ %@ %@ %d",
+ [self class],
+ [self valueForProperty:kGTMABPersonFirstNameProperty],
+ [self valueForProperty:kGTMABPersonLastNameProperty],
+ [self recordID]];
+#else // GTM_IPHONE_SDK
+ return [NSString stringWithFormat:@"%@ %@ %@ %@",
[self class],
[self valueForProperty:kGTMABPersonFirstNameProperty],
[self valueForProperty:kGTMABPersonLastNameProperty],
[self recordID]];
+#endif // GTM_IPHONE_SDK
}
+ (NSString *)localizedPropertyName:(GTMABPropertyID)property {
@@ -746,10 +754,17 @@ typedef struct {
}
- (NSString *)description {
+#if GTM_IPHONE_SDK
return [NSString stringWithFormat:@"%@ %@ %d",
[self class],
[self valueForProperty:kABGroupNameProperty],
[self recordID]];
+#else // GTM_IPHONE_SDK
+ return [NSString stringWithFormat:@"%@ %@ %@",
+ [self class],
+ [self valueForProperty:kABGroupNameProperty],
+ [self recordID]];
+#endif // GTM_IPHONE_SDK
}
@end
diff --git a/AddressBook/GTMABAddressBookTest.m b/AddressBook/GTMABAddressBookTest.m
index 4a7b0ce..0d1a3cd 100644
--- a/AddressBook/GTMABAddressBookTest.m
+++ b/AddressBook/GTMABAddressBookTest.m
@@ -611,7 +611,7 @@ static NSString *const kGTMABTestGroupName = @"GTMABAddressBookTestGroupName";
if (type == kGTMABDictionaryPropertyType) {
val = [[NSDictionary alloc] initWithObjectsAndKeys:@"1", @"1", nil];
} else if (type == kGTMABStringPropertyType) {
- val = [[NSString alloc] initWithFormat:@"value %d"];
+ val = [[NSString alloc] initWithFormat:@"value %zu", j];
} else if (type == kGTMABIntegerPropertyType
|| type == kGTMABRealPropertyType ) {
val = [[NSNumber alloc] initWithInt:143];