On Tue, Feb 8, 2011 at 9:29 PM, Graham Cox <graham....@bigpond.com> wrote:

> What's the proper way to do this? I searched the archives but surprisingly I 
> couldn't find any previous discussion of this, even though I would have 
> thought it's quite a common thing.

Probably it's more common to present a sheet saying "Saving is disabled in this 
demo.  Click this button to buy the real version…".  That's easy to paste in.

> On a side note, these callbacks seem very weird - they pass the selector to 
> call to you, but then also specify that they must be of a certain signature 
> (document:shouldClose:contextInfo:). Isn't that a bit redundant? Or should I 
> be building an invocation around the selector I'm given rather than assuming 
> the signature? I tried that, and it crashes hard, so I'm guessing that's not 
> a good idea. I don't understand why these callbacks are so convoluted instead 
> of just asking for a simple YES or NO answer to be returned.

Indeed, the document-saving API is complicated and tricky.  I learned from this:

http://www.cocoabuilder.com/archive/cocoa/153196-customizing-save-behavior-in-doc-based-apps.html?q=%22Don't+Save%22+save+automatically#153196

Whatever you do, test it well.

_______________________________________________

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 arch...@mail-archive.com

Reply via email to