Re: FileWrapper iCloud

2012-12-10 Thread Mike Abdullah
On 2 Dec 2012, at 01:00, Dave Fernandes wrote: On 2012-12-01, at 5:05 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 1 Dec 2012, at 20:21, Dave Fernandes wrote: NSPersistentDocument always creates a MOC of type NSMainQueueConcurrencyType, even if it is created on a background

Re: FileWrapper iCloud

2012-12-01 Thread Mike Abdullah
On 30 Nov 2012, at 23:05, Dave Fernandes dave.fernan...@utoronto.ca wrote: On 2012-11-30, at 4:46 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 30 Nov 2012, at 18:59, Dave Fernandes dave.fernan...@utoronto.ca wrote: On 2012-11-30, at 6:42 AM, Mike Abdullah

Re: FileWrapper iCloud

2012-12-01 Thread Dave Fernandes
On 2012-12-01, at 11:42 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: One way to look at it is that NSPersistentDocument pretty much painted itself into a corner from day 1, and it's too messy for Apple to untangle that. Can you elaborate? Well it makes the assumptions that your

Re: FileWrapper iCloud

2012-12-01 Thread Dave Fernandes
NSPersistentDocument always creates a MOC of type NSMainQueueConcurrencyType, even if it is created on a background thread. So as long as things don't go wrong during document opening, everything will be the same as a document opened on the main thread forever after. Whoops! I meant to say

Re: FileWrapper iCloud

2012-12-01 Thread Mike Abdullah
On 1 Dec 2012, at 20:21, Dave Fernandes wrote: NSPersistentDocument always creates a MOC of type NSMainQueueConcurrencyType, even if it is created on a background thread. So as long as things don't go wrong during document opening, everything will be the same as a document opened on the

Re: FileWrapper iCloud

2012-12-01 Thread Mike Abdullah
On 1 Dec 2012, at 20:12, Dave Fernandes wrote: On 2012-12-01, at 11:42 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: One way to look at it is that NSPersistentDocument pretty much painted itself into a corner from day 1, and it's too messy for Apple to untangle that. Can you

Re: FileWrapper iCloud

2012-12-01 Thread Dave Fernandes
On 2012-12-01, at 5:12 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: - is comprised of a single Core Data store - has a single managed object context This definitely limits your options. But, is it necessary to support file wrappers and iCloud? (Just trying to educate myself about

Re: FileWrapper iCloud

2012-12-01 Thread Dave Fernandes
On 2012-12-01, at 5:05 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 1 Dec 2012, at 20:21, Dave Fernandes wrote: NSPersistentDocument always creates a MOC of type NSMainQueueConcurrencyType, even if it is created on a background thread. So as long as things don't go wrong during

Re: FileWrapper iCloud

2012-11-30 Thread Mike Abdullah
On 30 Nov 2012, at 01:16, Sean McBride s...@rogue-research.com wrote: On Fri, 30 Nov 2012 00:43:36 +, Mike Abdullah said: With all the different features of the document system these days, it can be pretty hard to slot them all in nicely with Core Data. People may find

Re: FileWrapper iCloud

2012-11-30 Thread Dave Fernandes
On 2012-11-30, at 6:42 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 30 Nov 2012, at 01:16, Sean McBride s...@rogue-research.com wrote: On Fri, 30 Nov 2012 00:43:36 +, Mike Abdullah said: With all the different features of the document system these days, it can be pretty

Re: FileWrapper iCloud

2012-11-30 Thread Mike Abdullah
On 30 Nov 2012, at 18:59, Dave Fernandes dave.fernan...@utoronto.ca wrote: On 2012-11-30, at 6:42 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: One way to look at it is that NSPersistentDocument pretty much painted itself into a corner from day 1, and it's too messy for Apple to

Re: FileWrapper iCloud

2012-11-30 Thread Sean McBride
On Fri, 30 Nov 2012 21:46:24 +, Mike Abdullah said: Can you elaborate? Well it makes the assumptions that your document: - is comprised of a single Core Data store - has a single managed object context - works entirely on the main thread - only ever saves on top of itself, or to a new

Re: FileWrapper iCloud

2012-11-30 Thread Graham Cox
On 01/12/2012, at 9:01 AM, Sean McBride s...@rogue-research.com wrote: Could be. But Apple could have provided a NSPersistentDocument2 class that people could opt into. But they haven't. Have you noticed that they never do this though? It must be some sort of policy because there are

Re: FileWrapper iCloud

2012-11-30 Thread Sean McBride
On Sat, 1 Dec 2012 09:49:23 +1100, Graham Cox said: Could be. But Apple could have provided a NSPersistentDocument2 class that people could opt into. But they haven't. Have you noticed that they never do this though? It must be some sort of policy because there are numerous examples where a

Re: FileWrapper iCloud

2012-11-30 Thread Dave Fernandes
On 2012-11-30, at 4:46 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 30 Nov 2012, at 18:59, Dave Fernandes dave.fernan...@utoronto.ca wrote: On 2012-11-30, at 6:42 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: One way to look at it is that NSPersistentDocument pretty much

Re: FileWrapper iCloud

2012-11-29 Thread Mike Abdullah
On 10 Nov 2012, at 18:28, Sean McBride wrote: On Sat, 10 Nov 2012 18:09:58 +, Luke Hiesterman said: File wrappers don't make it inherently easier or harder to deal with iCloud. File packages (which you would use file wrappers to represent) can be elegant means of wrapping up document

Re: FileWrapper iCloud

2012-11-29 Thread Mike Abdullah
On 10 Nov 2012, at 21:36, Gordon Apple wrote: I don¹t know about iCloud, but I finally got file wrappers working for my NSPersistentDocument subclass. It wasn¹t easy. I use a separate folder for stored files, sibling to my coreData storage, in the same package. I based it losely on the

Re: FileWrapper iCloud

2012-11-29 Thread Sean McBride
On Fri, 30 Nov 2012 00:43:36 +, Mike Abdullah said: With all the different features of the document system these days, it can be pretty hard to slot them all in nicely with Core Data. People may find https://github.com/karelia/BSManagedDocument pretty handy for this (the real meat is in the

Re: FileWrapper iCloud

2012-11-29 Thread Gordon Apple
Well, if you are lobbying for features, IMHO, they should also at least include simple migration. On 11/29/12 7:16 PM, Sean McBride s...@rogue-research.com wrote: On Fri, 30 Nov 2012 00:43:36 +, Mike Abdullah said: With all the different features of the document system these days, it

Re: FileWrapper iCloud

2012-11-21 Thread Brad Stone
The wrapper functionality is a remnant of NSPersistentDocument but I don't use it anymore. Thanks for your answers, this was helpful. On Nov 10, 2012, at 1:28 PM, Sean McBride s...@rogue-research.com wrote: On Sat, 10 Nov 2012 18:09:58 +, Luke Hiesterman said: File wrappers don't make

Re: FileWrapper iCloud

2012-11-10 Thread Luke Hiesterman
File wrappers don't make it inherently easier or harder to deal with iCloud. File packages (which you would use file wrappers to represent) can be elegant means of wrapping up document data because it allows for easy separation of distinct components, and are usually recommended if they at all

Re: FileWrapper iCloud

2012-11-10 Thread Sean McBride
On Sat, 10 Nov 2012 18:09:58 +, Luke Hiesterman said: File wrappers don't make it inherently easier or harder to deal with iCloud. File packages (which you would use file wrappers to represent) can be elegant means of wrapping up document data because it allows for easy separation of distinct

Re: FileWrapper iCloud

2012-11-10 Thread Gordon Apple
I don¹t know about iCloud, but I finally got file wrappers working for my NSPersistentDocument subclass. It wasn¹t easy. I use a separate folder for stored files, sibling to my coreData storage, in the same package. I based it losely on the NSPersistentDocumentFileWrappers sample, then let my