Spinning FileCoordinator Notification
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 OFSDocumentStoreFileItemContentsChangedNotification. 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. |
Sure - I'll try and replicate with TextEdit.
|
All times are GMT -8. The time now is 06:19 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.