Re: Core Data complex structure
Re: Core Data complex structure
- Subject: Re: Core Data complex structure
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 14 Jun 2005 10:13:46 -0700
On Jun 14, 2005, at 9:50 AM, Sergio Bacchin wrote:
/ C1
B1- D1
/ \ E1
/
A
\ / G
\F- H / C2
\ B2- D2
\ E2
1) The Bx entity (and its related Cx,Dx,Ex) is repeated 2 times in
the graph (they are the same classes). How can I do it in a neater
way? (eg. defining the B->C,D,E subtree, and then instantiating
many times...)
2) Is it possible to represent an attribute in common to all
entities (e.g. name) in a outlineview+treecontroller using
bindings? Any hints?
Cocoa Bindings -- Key Value Coding / Observing, in general -- is
completely decoupled from the model. That is, a user interface
element's value could be bound to the key path "foo.bar.baz" and it
won't care about the class of any of the instances along that path.
So, to answer both (1) and (2), you would simply create a
relationship from (A) to (B) and from (F) to (B). As long as you
configure the relationships identically, including the name, key
paths starting at (A) or (F) that traverse through to (B) and below
will be identical.
Note that you can edit multiple attributes/relationships
simultaneously within Xcode's modeling tools. Since the modeling
tools are all built on Cocoa Bindings, simultaneous editing of
multiple selections comes for free.
b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden