mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 20:20:44 +00:00
CPRuleEditor: Since commit 2b52f7d, CPRuleEditor's delegate method -ruleEditor:displayValueForCriterion:inRow: is more restricive: you must return the same view object for a specific criterion in a given row.
In CPRuleEditorCibTest, the delegate has been updated to follow this rule, it also fixes a bug where the predicate was not correctly handling custom control values.
This commit is contained in:
1 parent
80f5ab09f3
commit
c327956537
1 file changed
+9
-2
@@ -84,8 +84,15 @@ var CPRuleEditorCustomControlClass = @"CPRuleEditorCustomControlClass";
|
||||
|
||||
if (custom_control_class != nil)
|
||||
{
|
||||
var custom_class = CPClassFromString(custom_control_class);
|
||||
return [[custom_class alloc] initWithFrame:CGRectMake(0, 0, 100, 18)];
|
||||
var control = [criterion objectForKey:("control_"+row)];
|
||||
if (control == nil)
|
||||
{
|
||||
var custom_class = CPClassFromString(custom_control_class);
|
||||
control = [[custom_class alloc] initWithFrame:CGRectMake(0, 0, 100, 18)];
|
||||
[criterion setObject:control forKey:("control_"+row)];
|
||||
}
|
||||
|
||||
return control;
|
||||
}
|
||||
|
||||
return [criterion objectForKey:@"valeur"];
|
||||
|
||||
Reference in new issue
Block a user