Re: Core Data, xcdatamodel
Re: Core Data, xcdatamodel
- Subject: Re: Core Data, xcdatamodel
- From: Tim Isted <email@hidden>
- Date: Sat, 16 Aug 2008 11:18:24 +0100
I'm assuming that you are using NSArrayControllers in your Interface
Builder nib/xib file...
Bind the Content Set for the rgb controller to the collection
controller's 'selection' with a model key path of whatever your
relationship is called (ie the to-many relationship in the collection
entity that points to the rgb values objects). This will offer the
restriction you need to have bound tableviews showing only the rgb
values that are related to a selected collection object.
You can also then bind the enabled attribute of your Add button to the
rgb controller's canAdd key. The button will then only be enabled if
there is an object created and selected in your collection array
controller.
Tim
On 16 Aug 2008, at 08:20, R T wrote:
From the xcdatamodel of a "Core Data Document-based Application",
I have two entities...
1st one entity is a set of rgb values.
2nd the other entity is a collection of these sets.
... so the add button of the 1st entity should not be available
until an object of the 2nd entity is added and selected. The 1st
entities tableview should show only the set of rgb values of a
selected 2nd entity object.
I've created these two entities, but I do not know how to restrict
the add button, nor how to limit whats displayed.
How do I configure these entities so they work correctly?
Thanks
Rick Tschudin
_______________________________________________
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