Hi, I have an NSDocument-based application which can potentially
take a very long time (more than a minute) to save a file and the
resulting
file can be very large (up to several GB). Overriding
doesn't sound like a good idea, since it seems that the AppKit
expects these
functions to have produced the entire file upon return. Also, if I
just spawn a
new thread from them, they would always have to return YES, even
though I
would like to allow the user to cancel the file saving operation. I
then tried to
override
in such a way that it saves the file to a temporary location, then
invokes the "super"
implementation when it's done and finally moves the file from the
temporary location
to the correct one inside
This works fine, but of course it only works under MacOS 10.4.
Furthemore it seems a bit
overkill to me to save to a temporary location before "writeToURL" is
called since that
one is anyway given a temporary URL only which then gets moved to the
correct location
by NSDocument... Does anybody out there know of any better / more
standard way of
achieving this? Thanks a lot,
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden