aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryFavoriteManager.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-09 14:23:53 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-09 14:23:53 +0000
commit604efb07d3cbbc46e93148c2bebb9ae95dd1de5f (patch)
tree01716ce13fc0ce0c3a98e68bf5643d70299a8568 /Source/SPQueryFavoriteManager.m
parent9004533ba1d84d670a77cbfc9eae401b66e9dd0e (diff)
downloadsequelpro-604efb07d3cbbc46e93148c2bebb9ae95dd1de5f.tar.gz
sequelpro-604efb07d3cbbc46e93148c2bebb9ae95dd1de5f.tar.bz2
sequelpro-604efb07d3cbbc46e93148c2bebb9ae95dd1de5f.zip
removed/refactored three instances of calling a method of untyped (id) objects
Diffstat (limited to 'Source/SPQueryFavoriteManager.m')
-rw-r--r--Source/SPQueryFavoriteManager.m10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index 11a5ec13..ef458c87 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -426,10 +426,12 @@
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
- if([[aTableColumn identifier] isEqualToString:@"name"] && [anObject length]) {
- [[favorites objectAtIndex:rowIndex] setObject:[anObject description] forKey:@"name"];
- // [[favorites objectAtIndex:rowIndex] setObject:[favoriteQueryTextView string] forKey:@"query"];
- [favoriteNameTextField setStringValue:[anObject description]];
+ if([[aTableColumn identifier] isEqualToString:@"name"]) {
+ if([anObject isKindOfClass:[NSString class]] && [(NSString *)anObject length]) {
+ [[favorites objectAtIndex:rowIndex] setObject:anObject forKey:@"name"];
+ // [[favorites objectAtIndex:rowIndex] setObject:[favoriteQueryTextView string] forKey:@"query"];
+ [favoriteNameTextField setStringValue:anObject];
+ }
}
[favoritesTableView reloadData];