adium 3138:929a9b48b25e: It turns out that aesthetic categories ...

commits at adium.im commits at adium.im
Tue Feb 23 23:05:49 UTC 2010


details:	http://hg.adium.im/adium/rev/929a9b48b25e
revision:	3138:929a9b48b25e
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 fe47f1cfcf37 -r 929a9b48b25e Frameworks/AIUtilities Framework/Source/AIArrayAdditions.h
--- a/Frameworks/AIUtilities Framework/Source/AIArrayAdditions.h	Sat Feb 20 21:26:16 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:(NSUInteger)newIndex;
-- (void)setObject:(id)object atIndex:(NSUInteger)idx;
 @end
diff -r fe47f1cfcf37 -r 929a9b48b25e Frameworks/AIUtilities Framework/Source/AIArrayAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIArrayAdditions.m	Sat Feb 20 21:26:16 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:(NSUInteger)idx
-{
-	[self replaceObjectAtIndex:idx withObject:object];
-}
-
 @end
diff -r fe47f1cfcf37 -r 929a9b48b25e Source/AIMentionAdvancedPreferences.m
--- a/Source/AIMentionAdvancedPreferences.m	Sat Feb 20 21:26:16 2010 -0500
+++ b/Source/AIMentionAdvancedPreferences.m	Mon Feb 08 15:58:53 2010 -0800
@@ -113,7 +113,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