• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CORE DATA: timestamping a model object before saving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CORE DATA: timestamping a model object before saving


  • Subject: CORE DATA: timestamping a model object before saving
  • From: dan pahlajani <email@hidden>
  • Date: Wed, 18 Jan 2006 13:29:38 -0800

Hello All,

I am working on a Core Data application and have a question. How can I set
the "modifiedOn" value of a model object just before it is saved?

I have tried to do so in my subclassed model object (NSManagedObject) in
willSave message using setValue:forKeyPath:. But it causes the save process
to fall in an infinite loop.

I am currently setting the modifiedOn value using
setPrimitiveValue:forKeyPath: in the willSave: method. The problem with
using the promitive variant is that the UI is not updated.

Is there a better way to do so. May be something like awakeFromInsert: and
awakeFromfetch: methods.

All the help will be greatly appreciated.

Thanks,
Dan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Stuck in basic bindings
  • Next by Date: Re: New titanium interface available to Cocoa developers?
  • Previous by thread: Fwd: New titanium interface available to Cocoa developers?
  • Next by thread: CORE DATA: derived values from several entities and managed object instances ??
  • Index(es):
    • Date
    • Thread