• 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
Re: How to keep creation/modification date of a (Core Data) object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to keep creation/modification date of a (Core Data) object?


  • Subject: Re: How to keep creation/modification date of a (Core Data) object?
  • From: "Arthur C." <email@hidden>
  • Date: Mon, 09 Jul 2007 19:23:46 +0200


On 08/07/07, Arthur C. <email@hidden> wrote:
This must be a simple use of setKeys:
triggerChangeNofiticationsForDependentKey, but I can't find the right method
for the key 'modificationDate'...
Creation date is easy, just an awakeFromInsert will do.
But the modification date (obviously) has to change whenever any of the keys
in the object changes. Moreover, it has to keep its value when we are just
asking for the modification date (getter method), and on program
shutdown/restart.



Does it have to update everytime a value is changed, or only when the object is saved and there are changed values (since those changed may be reverted)? If so, you can override -willSave and update the modification date in there.

In fact I want it to update on-the-fly, indeed. So a willSave is not enough...
I tried adding an extra instance variable 'modificationDateChanged' (bool), to be updated by triggerChangeNotification. The getter method would then call setModificationDate; but somehow the method does not get called (i.e. the triggerChangeNotification does not work).


Any better ideas?

Thanks,

Arthur C.


-Phil

_________________________________________________________________ Hotmail en Messenger on the move http://www.msn.nl/services

_______________________________________________

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


  • Follow-Ups:
    • Re: How to keep creation/modification date of a (Core Data) object?
      • From: Tony Becker <email@hidden>
References: 
 >Re: How to keep creation/modification date of a (Core Data) object? (From: "Philip Q" <email@hidden>)

  • Prev by Date: Re: Path to desktop
  • Next by Date: Re: Path to desktop
  • Previous by thread: Re: How to keep creation/modification date of a (Core Data) object?
  • Next by thread: Re: How to keep creation/modification date of a (Core Data) object?
  • Index(es):
    • Date
    • Thread