Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-10 Thread Jerry Krinock


On 2008 Oct, 09, at 2:27, chaitanya pandit wrote:


On 09-Oct-08, at 2:52 AM, Mike Abdullah wrote:

But why? NSPersistentDocument provides this automatically for you.  
It's only Save To that's not supported. Or is there a good reason  
to provide a custom implementation that I'm missing?


You're right NSPersistentDocument provides that already, actually i  
did the app. a while back and i found that my app had some weird  
document structure so i had to do it myself, you ain't missing  
anything


Well, maybe it's not "just me" then.  I have submitted Document  
Feedback to Apple.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-09 Thread chaitanya pandit


On 09-Oct-08, at 2:52 AM, Mike Abdullah wrote:



On 8 Oct 2008, at 20:48, chaitanya pandit wrote:


Hi,
I have implemented Save As... in one of my core data app.
What i do is, in  the  "saveToURL:  ofType: forSaveOperation:  
error:" method, if the save operation is NSSaveAsOperation, i  
migrate the persistent store to a new location given by the  
absoluteURL and also set the document's URL to the new one and call  
super's saveToURL...

Works for me


But why? NSPersistentDocument provides this automatically for you.  
It's only Save To that's not supported. Or is there a good reason to  
provide a custom implementation that I'm missing?
You're right NSPersistentDocument provides that already, actually i  
did the app. a while back and i found that my app had some weird  
document structure so i had to do it myself, you ain't missing anything


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread Mike Abdullah


On 8 Oct 2008, at 20:48, chaitanya pandit wrote:


Hi,
I have implemented Save As... in one of my core data app.
What i do is, in  the  "saveToURL:  ofType: forSaveOperation:  
error:" method, if the save operation is NSSaveAsOperation, i  
migrate the persistent store to a new location given by the  
absoluteURL and also set the document's URL to the new one and call  
super's saveToURL...

Works for me


But why? NSPersistentDocument provides this automatically for you.  
It's only Save To that's not supported. Or is there a good reason to  
provide a custom implementation that I'm missing?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread chaitanya pandit

Hi,
I have implemented Save As... in one of my core data app.
What i do is, in  the  "saveToURL:  ofType: forSaveOperation: error:"  
method, if the save operation is NSSaveAsOperation, i migrate the  
persistent store to a new location given by the absoluteURL and also  
set the document's URL to the new one and call super's saveToURL...

Works for me

Chaitanya

On 08-Oct-08, at 5:50 PM, Jerry Krinock wrote:

Documentation [1] states that "NSPersistentDocument does not support  
Save To operations".


First of all, I presume that "Save To" means "Save As...", although  
I cannot this presumption.  Could someone please confirm that "Save  
To" == "Save As..." ?


If so, I'd like my app to have a "Save As...", so this is  
disappointing.  But I can appreciate how such a thing would be  
difficult to do, and if Apple couldn't do it, obviously I shouldn't  
even try.  But if anyone has attempted to crack this nut, I'd like  
to hear about it.


Jerry Krinock

[1] 
http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/01_Task/chapter_2_section_4.html

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/chaitanya%40expersis.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread glenn andreas


On Oct 8, 2008, at 7:20 AM, Jerry Krinock wrote:

Documentation [1] states that "NSPersistentDocument does not support  
Save To operations".


First of all, I presume that "Save To" means "Save As...", although  
I cannot this presumption.  Could someone please confirm that "Save  
To" == "Save As..." ?



"Save To" != "Save As"

"Save As" writes the current document to a new file, and changes the  
current document's path to reflect that new file, so that the next  
time you do a "Save" it will write to that new file ("Save" of an new  
untitled document == "Save As")


"Save To" writes the current document to a new file, but does not  
change the current document's path, so the next time you do a "Save"  
it writes the original file.  "Save To" == "Save a Copy As" (and for  
some programs "Make Backup As")


Glenn Andreas  [EMAIL PROTECTED]
  wicked fun!
quadrium | prime : build, mutate, evolve, animate : the next  
generation of fractal art




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread Jerry Krinock
Documentation [1] states that "NSPersistentDocument does not support  
Save To operations".


First of all, I presume that "Save To" means "Save As...", although I  
cannot this presumption.  Could someone please confirm that "Save To"  
== "Save As..." ?


If so, I'd like my app to have a "Save As...", so this is  
disappointing.  But I can appreciate how such a thing would be  
difficult to do, and if Apple couldn't do it, obviously I shouldn't  
even try.  But if anyone has attempted to crack this nut, I'd like to  
hear about it.


Jerry Krinock

[1] 
http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/01_Task/chapter_2_section_4.html

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]