On 2010 Sep 09, at 04:14, Amy Gibbs wrote:

> I didn't really want to save the values as attributes, as I'd like the values 
> to reflect changes to the product prices. I only need to display these in a 
> label onscreen.
> 
> Is this what transient attributes are for?

Yes, but before you use transient attributes, be sure to study all their 
limitations given in the Core Data Programming Guide.

I am not a fan of transient attributes, as you can read here:

http://www.cocoabuilder.com/archive/cocoa/237109-only-one-reason-to-ever-use-transient-properties-in-core-data.html?q=only+reason+transient+attributes#237109

http://www.cocoabuilder.com/archive/cocoa/234791-core-data-fetches-transient-properties-nspredicateeditor-sadness.html?q=only+reason+transient+attributes#234899

Unless you have a user base of millions, or are a fantastic programmer, it's 
hard to beat today's hard drive prices of less than a dollar per gigabyte.  So 
the smartest solution is often to just leave the "unnecessary" attributes in 
the persistent store, and start on your next project.  Another alternative is 
to add a regular instance variable to your managed object.  Regular ivars still 
work.  Or, in this case, it appears that calculating them as needed and 
implementing +keyPathsForValuesAffectingXxxxx to make them KVObserveable would 
work and get you home on time.

_______________________________________________

Cocoa-dev mailing list ([email protected])

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

This email sent to [email protected]

Reply via email to