On Jun 6, 2012, at 13:08 , cocoa-dev-requ...@lists.apple.com wrote: > Date: Wed, 06 Jun 2012 14:50:17 +1000 > From: Graham Cox <graham....@bigpond.com> > To: Samuel Williams <space.ship.travel...@gmail.com> > Message-ID: <fcd6ccc5-8c3b-4c81-b1a6-98b0c1ad1...@bigpond.com> > > 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 <rai...@brockerhoff.net> 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 (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com