adium-1.4 2899:9360ad095234: It turns out that aesthetic categor...
commits at adium.im
commits at adium.im
Tue Feb 23 23:29:04 UTC 2010
details: http://hg.adium.im/adium-1.4/rev/9360ad095234
revision: 2899:9360ad095234
author: David Smith <catfish.man at gmail.com>
date: Mon Feb 08 15:58:53 2010 -0800
It turns out that aesthetic categories on Cocoa classes are not always safe...
diffs (36 lines):
diff -r d0720f14c160 -r 9360ad095234 Frameworks/AIUtilities Framework/Source/AIArrayAdditions.h
--- a/Frameworks/AIUtilities Framework/Source/AIArrayAdditions.h Wed Feb 03 13:05:37 2010 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIArrayAdditions.h Mon Feb 08 15:58:53 2010 -0800
@@ -16,5 +16,4 @@
@interface NSMutableArray (ESArrayAdditions)
- (void)addObjectsFromArrayIgnoringDuplicates:(NSArray *)inArray;
- (void)moveObject:(id)object toIndex:(unsigned)newIndex;
-- (void)setObject:(id)object atIndex:(unsigned)index;
@end
diff -r d0720f14c160 -r 9360ad095234 Frameworks/AIUtilities Framework/Source/AIArrayAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIArrayAdditions.m Wed Feb 03 13:05:37 2010 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIArrayAdditions.m Mon Feb 08 15:58:53 2010 -0800
@@ -115,11 +115,4 @@
[self removeObjectAtIndex:currentIndex];
}
-//just a better name for an existing NSMutableArray method.
-//this makes it uniform in style with -[NSMutableDictionary setObject:forKey:].
-- (void)setObject:(id)object atIndex:(unsigned)index
-{
- [self replaceObjectAtIndex:index withObject:object];
-}
-
@end
diff -r d0720f14c160 -r 9360ad095234 Source/AIMentionAdvancedPreferences.m
--- a/Source/AIMentionAdvancedPreferences.m Wed Feb 03 13:05:37 2010 -0500
+++ b/Source/AIMentionAdvancedPreferences.m Mon Feb 08 15:58:53 2010 -0800
@@ -115,7 +115,7 @@
NSString *identifier = tableColumn.identifier;
if ([identifier isEqualToString:@"text"]) {
- [mentionTerms setObject:object atIndex:row];
+ [mentionTerms replaceObjectAtIndex:row withObject:object];
[self saveTerms];
}
}
More information about the commits
mailing list