Core Data user-defined fields
Core Data user-defined fields
- Subject: Core Data user-defined fields
- From: Trygve Inda <email@hidden>
- Date: Mon, 02 May 2016 13:19:20 -0700
- Thread-topic: Core Data user-defined fields
I have a core data document-based app at the document level is a Core Data
type called Library, with a one to many relationship to type Element.
Element has a few properties but I want to allow the user to add others (of
type string only at this point).
So I have Element:
String name
String propA
String propB
String propC
I think I need to add a one-to-many
Set userProperties
And a UserProperty type would have two properties:
String propName
String propValue
When all this is displayed in a table bound with Core Data. I want a column
for propD (so a UserProperty with propName = "propD").
How do I show the values since I have to go:
element.userProperties, then get to propName = "propD" and then grab the
propValue?
Is it important to make sure all elements have this? I'd like users to be
able to enter values in the table.
Properties for propA, propB, propC are easy but I need to user to be able to
create a column for propD and add values for some (or all) elements.
Thanks,
Trygve
_______________________________________________
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