RE: Core data / bindings with two one->many relationships
RE: Core data / bindings with two one->many relationships
- Subject: RE: Core data / bindings with two one->many relationships
- From: "Arthur C." <email@hidden>
- Date: Thu, 12 Jul 2007 19:47:03 +0200
This problem can be translated to the following: we have a grandparent
family, which can have many children, each of which can have multiple
grandchildren.
Grandparent Family <->> Children <->> Grandchildren
Now I would like to have a table in my interface with all the
Grandchildren, say older than 6
years, of the selected Grandparent Family (i.e. selected in the table of
grandparent families).
I can set up a table which shows the all the children of a selected
Grandparent family but don't know how to get all the grand children
older than 6.
I have found this sample code project "Two Many Controllers"
(http://developer.apple.com/samplecode/TwoManyControllers/index.html) that
does almost exactly this. In the terminology above, it shows in fact all the
grand children. I want to add a filter predicate.
There are a few problems with that:
- when I set the predicate in the All licenses array controller (Interface
Builder under 'Attributes'), nothing happens (it does not work).
- when I bind the 'filterPredicate' to an object returning the predicate, it
does work; but it is updated correctly only when I select another Product
(or Grandparent family).
So, the questions are:
- what is the difference between a predicate set in the Attributes section
and one using a binding on 'filterPredicate'?
- how can I make the array controller update instantaneously (using the
filter predicate) when I make changes to some objects?
Your help would be appreciated.
Arthur C.
_________________________________________________________________
Play online games with your friends with Messenger
http://www.join.msn.com/messenger/overview
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden