New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

CoreData and binding a TableColumn to values from another Entity


Post Reply New Thread Subscribe

 
Thread Tools
Corben

 
Member Since: Feb 05, 2014
Posts: 1
Corben is on a distinguished road

Corben is offline
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):

Code:
[NSTableColumn bind:@"value" toObject:self withKeyPath:@"arrangedObjects.b.@sum.c.boolValue" options:nil];
The ArrayController self is in Entity Name mode with Entity Name: A.

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)}"
)
in this Example:

a1 owns no objects from type b

a2
-b1 - c3 (boolvalue: 1)
-b2 - c2 (boolvalue: 0)
-b3 - c1 (boolvalue: 1)
a3
-b4 - c1 (boolvalue: 1)
QUOTE Thanks

Post Reply New Thread Subscribe


« ssh into idle ? | DropBox Root »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 10:26 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?