Re: coredata to-many relationships
Re: coredata to-many relationships
- Subject: Re: coredata to-many relationships
- From: Amy Gibbs <email@hidden>
- Date: Wed, 14 Jul 2010 09:43:46 +0100
Thanks, a good night sleep and reading that helped, but it's
connecting the interface where I'm stuck I think,
So Far, I've got my tables and buttons and controllers etc to add/
delete the main entities (products and kits)
On the left hand side of my kits view there's a table with all of the
kits, and I've got a table on the right to display the products linked
to the selected kit. Underneath this table is a button that makes a
panel appear with a copy of the products list, and there's a button
there that should add the items to the kit.
I've got a kit Items array controller, that I've connected the add
button to, but it's adding a new kit, rather than a new kit <->
product relationship. Maybe I've not got the array controller set up
properly?
I'm sure this is something really simple that I'm just not seeing,
I've got the concept of creating new instances of entities, but not
relationships.
I appreciate any help.
Many Thanks
On 13 Jul 2010, at 10:40PM, Keary Suska wrote:
On Jul 13, 2010, at 12:02 PM, Amy Gibbs wrote:
I've read pages and pages on the internet, and looked at the
samples, and I've got Hillegass (2nd and 3rd editions) but I'm also
a newbie,
I'm trying to create a fairly simple app, and I'm a bit stuck with
the to-many relationships.
I've got 2 entities, Product and Kit.
There will be lots of products, and lots of kits. Kits can contain
multiple products, and products can be part of multiple kits. In
the data modeller they are set up as inverse to-many relationships
of each other.
In my interface, I've got a tabbed layout, one for Products, and
one for Kits,
I can add new products, and I can add new kits, but I can't work
out how to add products to the kits. I only want to be able to add
existing products to the kits (so I'll have to add the products
first, then add them to the kits).
I my head I'm seeing a popup, but I've no idea how to actually make
the connection between the kit and product (or vice versa)
I hope this makes sense, can anyone point me in the right direction?
This is all clearly explained in the Core Data Programming Guide,
specifically: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOs.html#/
/apple_ref/doc/uid/TP40001803-212651
Or, you need to be more specific about what you do not understand.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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