The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > Omni Frameworks
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Spinning FileCoordinator Notification Thread Tools Search this Thread Display Modes
Hi -

I implemented a custom OUIDocument class and used (NSData) dataWithContentsOfURL:options:error in my - (BOOL)ReadFromURL:error: override. Thought I was being smart by specifying NSDataReadingMappedIfSafe as an option only to realize (after a few sleepless nights) that it causes endless OFSDocumentStoreFileItem:presentedItemDidChange notifications which in turn posts OFSDocumentStoreFileItemContentsChangedNotificatio n.

This is fixed by using the simple (no option version) of dataWithContentsOfURL OR the following options:
NSDataReadingUncached - works
NSDataReadingMappedAlways - works

At this point, I'm just wondering why the NSDataReadingMappedIfSafe read option causes this behavior.
Just curious.

Thanks in advance.
I haven't hit this case -- I suppose NSData could be doing a coordinated read in this case, which might cause file presenters (maybe including the document) to be asked to yield to readers (writing their changes).

I don't see anything in the documentation about NSData doing coordinated reads in this case, though. Presumably the TextEditor sample could be changed to replicate the problem -- it would be interesting to see if hear if you hit the problem in this case.
CTO, The Omni Group
Sure - I'll try and replicate with TextEdit.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spinning beachball on startup xsive OmniGraffle General 0 2011-10-24 08:35 PM
Spinning wheel Sass OmniWeb General 5 2009-08-13 01:34 PM
Spinning pizza tatami OmniWeb General 2 2009-01-12 03:03 PM
spinning at the beginning librarymonkey27 OmniFocus 1 for Mac 2 2007-12-02 07:38 AM
Spinning beachball - ?overload 65hefalumps OmniOutliner 3 for Mac 2 2007-04-05 08:34 AM

All times are GMT -8. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.