mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 18:30:59 +00:00
several bindings / KVC fixes
- setValue:forKeyPath will now get call setValue:forKeyPath again on the value of the first part of the key path - override valueForKeyPath: and valueForKey: in CPObjectController's CPControllerSelectionProxy to return controller markers when appropriate - override setValue:forKeyPath: and setValue:forKey: in CPObjectController's CPControllerSelectionProxy to bypass possible controller markers This commit also removes previous hacks for compound paths and adds test cases for the errors. All this is related to issue #967.
This commit is contained in:
1 parent
b49dc87a86
commit
34339fbcd9
4 files changed
+98
-65
No files matched your search
@@ -37,13 +37,6 @@
|
||||
|
||||
[self assert:department equals:[employee valueForKey:@"department"]];
|
||||
[self assert:@"Engineering" equals:[employee valueForKeyPath:@"department.name"]];
|
||||
|
||||
// When using selection bindings, part of a keypath might contain a controller marker
|
||||
// (e.g. the selection.employees part of selection.employees.name might return the CPMultipleValuesMarker)
|
||||
// This test makes sure that in such a case we return the controller marker in stead of trying to ask the controller
|
||||
// marker for it's value for key.
|
||||
[employee setDepartment:CPMultipleValuesMarker];
|
||||
[self assert:CPMultipleValuesMarker equals:[employee valueForKeyPath:@"department.name"]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in new issue
Block a user