On Jun 6, 2012, at 13:08 , [email protected] wrote: > Date: Wed, 06 Jun 2012 14:50:17 +1000 > From: Graham Cox <[email protected]> > To: Samuel Williams <[email protected]> > Message-ID: <[email protected]> > > Are you aware that this class is riddled with severe bugs under the current > sandbox implementation? > > The dev forums will reveal more details. > > Also, NSSavePanel doesn't inherit from NSPanel under sandboxing, so if you > are expecting to use inherited methods, they don't work. > ... > On 06/06/2012, at 1:41 PM, Samuel Williams wrote: >> >> I'm having trouble with NSSavePanel runModal in a sandbox: >> >> NSSavePanel * savePanel = [NSSavePanel savePanel]; >> savePanel.title = @"Document Migration"; >> savePanel.directoryURL = url; >> savePanel.nameFieldStringValue = [url lastPathComponent]; >> savePanel.allowedFileTypes = [NSArray arrayWithObject:typeName]; >> savePanel.message = @"Your document needs to be upgraded."; >> >> [savePanel setCanSelectHiddenExtension:YES]; >> [savePanel setExtensionHidden:YES]; >> >> NSInteger result = [savePanel runModal];
I've had no problems at all with NSSavePanel under the sandbox (the inherited methods limitation that Graham mentioned excepted). My usage looks almost exactly like the code above except that I call -beginSheetModalForWindow:completionHandler: instead of -runModal. BUT. You need the com.apple.security.files.user-selected.read-write entitlement set to YES. HTH, -- Rainer Brockerhoff <[email protected]> Belo Horizonte, Brazil "In the affairs of others even fools are wise In their own business even sages err." Weblog: http://www.brockerhoff.net/blog _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
