aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPContentFilterManager.m8
-rw-r--r--Source/SPFieldEditorController.m2
-rw-r--r--Source/SPQueryFavoriteManager.m10
3 files changed, 12 insertions, 8 deletions
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];
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index fa7a8edd..7b52bbf8 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -411,7 +411,7 @@
break;
case 2: // hex - load on demand
[[self window] makeFirstResponder:hexTextView];
- if([sheetEditData length] && [[hexTextView string] isEqualToString:@""]) {
+ if([[hexTextView string] isEqualToString:@""]) {
[editSheetProgressBar startAnimation:self];
if([sheetEditData isKindOfClass:[NSData class]]) {
[hexTextView setString:[sheetEditData dataToFormattedHexString]];
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];