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 protected] 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 protected])
>
> 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/cocoadev%40mikeabdullah.net
>
> This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
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]