I am trying to create an NSPredicateEditorRowTemplate with its last
view a popup that contains a list of things (elsewhere in the window)
that can be updated while the editor is being displayed. I can get it
so that I can add an instance of the template, update the list of
items and add another instance which shows the updated list, but the
original does not update.
For example, the original templates specifies A,B,C in the last
popup. I add a row with that template then I add a D to the list of
items and then add another row to the Predicate Editor. This new row
will show me a list of A,B,C,D but the original row still just shows
A,B,C.
Is there a way to resync that existing row with the new list of items
in its source template? Am I going to have to remove and re-add the
row programmatically?
Guy
Here is some code from my hack to try to figure this out:
while (template = [enumerator nextObject])
{
NSArray* a = [template leftExpressions];
if (a != nil)
{
NSExpression* ex = [a objectAtIndex:0];
if (([ex expressionType] == NSKeyPathExpressionType))
{
if ([[ex keyPath] isEqual:@"Filled"])
{
continue;
}
}
}
[newRowTemplates addObject: template];
}
[newRowTemplates addObject:_filledTemplate];
[_editor setRowTemplates: newRowTemplates];
// [_editor reloadCriteria]; //thing makes many bad things happen if
I uncomment it
}