Re: Implementing an import command in NSDocument-based app
Re: Implementing an import command in NSDocument-based app
- Subject: Re: Implementing an import command in NSDocument-based app
- From: Rick Mann <email@hidden>
- Date: Wed, 16 May 2018 01:13:44 -0700
Thank you, that's all good advice.
> On May 16, 2018, at 00:26 , Rick Mann <email@hidden> wrote:
>
> I'm working on a little NSDocument-based app. The documents are packages (a
> directory containing multiple files). One of the operations is to import a
> music file into the document, which should copy the music file into the
> package, and set it as the track for the document.
>
> Undoing this operation is somewhat complex (where do I store the previous
> track if any?). So for now, I want to ignore undo.
>
> But I'm not sure how to copy the track file into the package. For example,
> what if it's an untitled document, and therefore has no package on disk? The
> action should result in a dirty document that isn't committed to disk until
> the next save (be it automatic or manual).
>
> Can this even be done without undo?
>
> Along those lines, how do I mark a document as dirty after some change,
> without making the change undoable?
>
> Thanks,
>
> --
> Rick Mann
> email@hidden
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden