• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSSavePanel runModal isn't working in sandbox?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSavePanel runModal isn't working in sandbox?


  • Subject: NSSavePanel runModal isn't working in sandbox?
  • From: Samuel Williams <email@hidden>
  • Date: Wed, 06 Jun 2012 15:41:28 +1200

Hi,

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];

if (result == NSFileHandlingPanelOKButton) {
NSAssert(savePanel.URL != nil, @"NSSavePanel returned nil for URL");


Without the sandbox, it works fine, with the sandbox, the savePanel.URL is
nil.

Any ideas what is going on? I looked at the documentation on sandbox and it
didn't mention anything about runModal. I'm going to try using the
completion handler method...

Kind regards,
Samuel
_______________________________________________

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

  • Follow-Ups:
    • Re: NSSavePanel runModal isn't working in sandbox?
      • From: Mike Abdullah <email@hidden>
    • Re: NSSavePanel runModal isn't working in sandbox?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: can't hide scrollbar on NSTableView
  • Next by Date: Re: NSSavePanel runModal isn't working in sandbox?
  • Previous by thread: Re: Date Added Attribute?
  • Next by thread: Re: NSSavePanel runModal isn't working in sandbox?
  • Index(es):
    • Date
    • Thread