Re: NSSavePanel problem with sandboxing
Re: NSSavePanel problem with sandboxing
- Subject: Re: NSSavePanel problem with sandboxing
- From: Fritz Anderson <email@hidden>
- Date: Thu, 05 Sep 2013 18:33:06 -0500
On 5 Sep 2013, at 1:27 PM, Graham Cox <email@hidden> wrote:
> I'm using NSSavePanel in a sandboxed app. The panel includes a custom accessory view, which works fine.
>
> I run the panel using -[NSSavePanel beginSheetModalForWindow:completionHandler:];
>
> In the completion handler, I call [savePanel makeFirstResponder:savePanel] so that any text fields left in a 'pending' state commit their contents to update the stuff they set via action methods. This is the usual way I commit unsaved fields in any dialog or sheet, and that's always worked.
>
> This also works, except on 10.7 (10.6 and 10.8 seem OK). On 10.7, I get an exception: -[NSRemoteSavePanel makeFirstResponder:]: unrecognized selector sent to instance. The documentation for sandboxing suggests that this is likely to be the case, though I've read somewhere that the full NSPanel methods are available at some well-defined times (I can't however find the documentation that mentions that, and whether the completion handler is one of the sanctioned times).
>
> What can I do here to workaround this?
The next thing I'd do is to see if the <NSEditor> protocol would be of any comfort. I think it may even be preferred to resetting the window's first responder.
30 seconds' thought, take it for its worth.
— F
_______________________________________________
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