Re: prepareSavePanel - save as or save to?
Re: prepareSavePanel - save as or save to?
- Subject: Re: prepareSavePanel - save as or save to?
- From: Mike Abdullah <email@hidden>
- Date: Tue, 12 Jan 2010 17:43:12 +0000
There's nothing convenient built in. My solution is to add an ivar along the lines of "lastSavePanelOperation".
Override like so:
- (void)runModalSavePanelForSaveOperation:(NSSaveOperationType)saveOperation
delegate:(id)delegate
didSaveSelector:(SEL)didSaveSelector
contextInfo:(void *)contextInfo
{
lastSavePanelOperation = saveOperation;
[super runModalSavePanelForSaveOperation:saveOperation
delegate:delegate
didSaveSelector:didSaveSelector
contextInfo:contextInfo];
}
And then in -prepareSavePanel:, you have access to what the operation is.
On 12 Jan 2010, at 07:11, email@hidden wrote:
> Hi,
>
> Is there a way to tell in prepareSavePanel if the save operation is an NSSaveAsOperation or an NSSaveToOperation?
>
> thanks
> Jeff
>
> _______________________________________________
>
> 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
_______________________________________________
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