• 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 delayed notification after sleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data delayed notification after sleep


  • Subject: Core Data delayed notification after sleep
  • From: Guy Meyer <email@hidden>
  • Date: Fri, 12 May 2006 01:23:06 +0300

Hi

My application adds an entry to a Core Data bound table after sleep.

On wake up the bound table is not getting updated although an entity was added to the managed object.

Only when there is another mouse or keyboard event the notification is being sent and the table gets updated.

After some research I had found that the core data "content" change notification is only sent if there is another keyboard or mouse event.

I have made a small program which demonstrate this <http:// homepage.mac.com/rominar/CoreTest.zip>

I tried to overcome the issue via various notification without success.

Any workaround will be appreciated (one of the workarounds maybe generating an artificial event).

Guy

P.S.

In addition to the above, it seems that when an object/managed object is added to an array controller, either by context or by KVO binding, a notification that there is a content change (i.e. the whole array had been changed) is being sent forcing a "setContent" method instead of sending a notification that an object had been added.

Because of the above the NSArrayController option "selectsInsertedObjects" does not work with Core Data or Binding, it just works when an object is being added to the array controller directly.

The above program also demonstrate the said issue.

The source for the above behavior may be found in NSArrayController documentation which includes the following:

"It is important to note that inserting many objects with selectsInsertedObjects on can cause a significant performance penalty. In this case it is more efficient to use the setContent: method to set the array, or to set selectsInsertedObjects to NO before adding the objects with addObjects:."


_______________________________________________ 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: question about classes, I think
  • Next by Date: Re: creating NSCalendarDate with a specific time zone
  • Previous by thread: Re: question about classes, I think
  • Next by thread: NSURLConnection percentage calculation
  • Index(es):
    • Date
    • Thread