From 604efb07d3cbbc46e93148c2bebb9ae95dd1de5f Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sat, 9 Jan 2010 14:23:53 +0000 Subject: removed/refactored three instances of calling a method of untyped (id) objects --- Source/SPContentFilterManager.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Source/SPContentFilterManager.m') diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index 5ef8695c..e1d7e389 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -424,9 +424,11 @@ - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { - if([[aTableColumn identifier] isEqualToString:@"MenuLabel"] && [anObject length]) { - [[contentFilters objectAtIndex:rowIndex] setObject:[anObject description] forKey:@"MenuLabel"]; - [contentFilterNameTextField setStringValue:[anObject description]]; + if([[aTableColumn identifier] isEqualToString:@"MenuLabel"]) { + if([anObject isKindOfClass:[NSString class]] && [(NSString *)anObject length]) { + [[contentFilters objectAtIndex:rowIndex] setObject:anObject forKey:@"MenuLabel"]; + [contentFilterNameTextField setStringValue:anObject]; + } } [contentFilterTableView reloadData]; -- cgit v1.2.3