Re: NSDocument package saving invalidates wrapper? Options?

2012-09-04 Thread Mike Abdullah
On 2 Sep 2012, at 21:29, Markus Spoettl ms_li...@shiftoption.com wrote: On 9/2/12 10:12 PM, Mike Abdullah wrote: OK, thanks a lot for that tip. Even though I overwrote -setFileURL: for some other task it never occurred to me to look if that's a better place. Feels very natural actually. I

Re: NSDocument package saving invalidates wrapper? Options?

2012-09-02 Thread Markus Spoettl
On 9/1/12 10:23 PM, Mike Abdullah wrote: It seems you're right; this is a side-effect of how NSDocument does safe-saving. If the file wrappers internally hold onto the URL they were last written to, that's no good if the file moves out underneath them. To cope they'd have to be using a bookmark

Re: NSDocument package saving invalidates wrapper? Options?

2012-09-02 Thread Mike Abdullah
On 2 Sep 2012, at 08:04, Markus Spoettl ms_li...@shiftoption.com wrote: On 9/1/12 10:23 PM, Mike Abdullah wrote: It seems you're right; this is a side-effect of how NSDocument does safe-saving. If the file wrappers internally hold onto the URL they were last written to, that's no good if the

Re: NSDocument package saving invalidates wrapper? Options?

2012-09-02 Thread Markus Spoettl
On 9/2/12 1:12 PM, Mike Abdullah wrote: On 9/1/12 10:23 PM, Mike Abdullah wrote: It seems you're right; this is a side-effect of how NSDocument does safe-saving. If the file wrappers internally hold onto the URL they were last written to, that's no good if the file moves out underneath them. To

Re: NSDocument package saving invalidates wrapper? Options?

2012-09-02 Thread Markus Spoettl
On 9/2/12 10:12 PM, Mike Abdullah wrote: OK, thanks a lot for that tip. Even though I overwrote -setFileURL: for some other task it never occurred to me to look if that's a better place. Feels very natural actually. I find it extremely odd that the requirement to update file wrapper isn't

Re: NSDocument package saving invalidates wrapper? Options?

2012-09-01 Thread Mike Abdullah
On 23 Aug 2012, at 14:12, Markus Spoettl ms_li...@shiftoption.com wrote: I have an NSDocument based app that has uses packages do to store a complex structure. When I open a document, I keep the wrapper around handed to the document in -readFromFileWrapper:ofType:error: in order to

NSDocument package saving invalidates wrapper? Options?

2012-08-23 Thread Markus Spoettl
I have an NSDocument based app that has uses packages do to store a complex structure. When I open a document, I keep the wrapper around handed to the document in -readFromFileWrapper:ofType:error: in order to lazy-load parts of the package when my app needs them. Similarly, I keep the