On Jul 6, 2015, at 5:15 PM, Quincey Morris 
<quinceymor...@rivergatesoftware.com<mailto:quinceymor...@rivergatesoftware.com>>
 wrote:

On Jul 6, 2015, at 13:10 , Rick Aurbach 
<r...@aurbach.com<mailto:r...@aurbach.com>> wrote:

So my question: does this make any sense?

If I was going to Swift-ify the Event concept, I wouldn’t use an enum *inside* 
an Event object, I’d use an enum (with associated values) *instead of* an Event 
object. In the context of Core Data, this would similar to creating a custom 
scalar property that’s backed by a Core Data property, which is not hard but 
incredibly badly documented in the Core Data reference guide.

But since this is Core Data, I’m not sure it’s a good idea to add an eighth 
hell to the seven you’re in already. It may be better to stick to whatever is 
most natural for Core Data, which is whatever you’d do in Obj-C.


Quincy,

Thanks for your response.

Are you suggesting that we implement a custom fetched property rather than an 
entity as a way of implementing the idea that a “main” object may have a whole 
set of events associated with it (presumably ordered by date/time)? That’s an 
interesting idea, although I must say I’ve never used fetched properties before 
and don’t really understand the pluses and minuses of this approach.

I was thinking about uses a one-to-many relationship between “main” objects and 
event objects. (It’s what I’m familiar with.) But I am certainly willing to be 
convinced to try something new!

If I am correctly understanding you, then I hope you will be willing to share 
why you think a fetched property might be useful in this situation. (I’m 
learning Swift for this project; it would be fun to learn something new about 
CoreData, too.)

Thanks,

Rick
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to