diff options
-rw-r--r-- | Source/SPContentFilterManager.m | 2 | ||||
-rw-r--r-- | Source/TableContent.m | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index 540000ab..35896fcc 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -182,7 +182,7 @@ NSMutableDictionary *d = [[NSMutableDictionary alloc] init]; [d setDictionary:[contentFilters objectAtIndex:i]]; NSMutableArray *conjLabel = [[NSMutableArray alloc] init]; - numOfArgs = [[[contentFilterTextView string] componentsMatchedByRegex:@"(?<!\\\\)(\\$\\{.*?\\})"] count]; + numOfArgs = [[[d objectForKey:@"Clause"] componentsMatchedByRegex:@"(?<!\\\\)(\\$\\{.*?\\})"] count]; if(numOfArgs > 1) { if([d objectForKey:@"ConjunctionLabel"]) { [conjLabel addObject:[d objectForKey:@"ConjunctionLabel"]]; diff --git a/Source/TableContent.m b/Source/TableContent.m index c4f60029..6b8ecf0e 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1061,11 +1061,14 @@ NSDictionary *filter = [[contentFilters objectForKey:compareType] objectAtIndex:lastSelectedContentFilterIndex]; NSUInteger numOfArgs = [[filter objectForKey:@"NumberOfArguments"] intValue]; - if ([[filter objectForKey:@"NumberOfArguments"] intValue] == 2) { + if (numOfArgs == 2) { [argumentField setHidden:YES]; - if(numOfArgs == 1) + if([filter objectForKey:@"ConjunctionLabels"] && [[filter objectForKey:@"ConjunctionLabels"] count] == 1) [betweenTextField setStringValue:[[filter objectForKey:@"ConjunctionLabels"] objectAtIndex:0]]; + else + [betweenTextField setStringValue:@""]; + [betweenTextField setHidden:NO]; [firstBetweenField setHidden:NO]; [secondBetweenField setHidden:NO]; |