Hello mac-forums Community!
I have created 3 entities:
A <-->> B <<--> C, C has a BOOLEAN atribute.
Now I want do display, in a two Column Table, the name of A (1st column) and a boolean value (2nd column) which based on the boolean values from C.
For example:
An Object from type A (called a) owns 3 Objects from Type B (called b1, b2, b3).
Each of these 3 Objects owns 1 Object from Type C (called c1, c2, c3).
If the boolean Attribute of one of these Objects (c1, c2, c3) is TRUE, the boolean in the 2nd column have to be true.
I have tried something like that (with a custom ArrayController Class):
The ArrayController self is in Entity Name mode with Entity Name: A.
but an error occurred:
without the @sum collector, the Content is like that:
in this Example:
a1 owns no objects from type b
a2
I have created 3 entities:
A <-->> B <<--> C, C has a BOOLEAN atribute.
Now I want do display, in a two Column Table, the name of A (1st column) and a boolean value (2nd column) which based on the boolean values from C.
For example:
An Object from type A (called a) owns 3 Objects from Type B (called b1, b2, b3).
Each of these 3 Objects owns 1 Object from Type C (called c1, c2, c3).
If the boolean Attribute of one of these Objects (c1, c2, c3) is TRUE, the boolean in the 2nd column have to be true.
I have tried something like that (with a custom ArrayController Class):
Code:
[NSTableColumn bind:@"value" toObject:self withKeyPath:@"[email protected]" options:nil];
but an error occurred:
Code:
[__NSSetI decimalValue]: unrecognized selector sent to instance
without the @sum collector, the Content is like that:
Code:
NSLog(@"%@", [self valueForKeyPath:@"arrangedObjects.b.c.bool"]);
Output:
2014-02-05 15:57:46.747 Cocktail DB[10943:303]
(
"{(\n)}",
"{(\n 0,\n 1\n)}",
"{(\n 1\n)}"
)
a1 owns no objects from type b
a2
-b1 - c3 (boolvalue: 1)
-b2 - c2 (boolvalue: 0)
-b3 - c1 (boolvalue: 1)
a3-b2 - c2 (boolvalue: 0)
-b3 - c1 (boolvalue: 1)
-b4 - c1 (boolvalue: 1)