• 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
Re: Another sandboxing snafu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another sandboxing snafu


  • Subject: Re: Another sandboxing snafu
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 14 Sep 2012 10:07:43 +0100

On 14 Sep 2012, at 00:15, Graham Cox <email@hidden> wrote:

> Grrr... and here's exactly the sort of stupid thing that I was referring to a moment ago in another thread...
>
>
> I'm attempting to show an NSOpenPanel as a sheet, app is sandboxed. This has always worked perfectly fine:
>
> 	NSOpenPanel*	op = [NSOpenPanel openPanel];
>
> 	[op setAllowsMultipleSelection:NO];
> 	[op setCanChooseDirectories:NO];
> 	[op setAllowedFileTypes:[NSImage imageFileTypes]];
>
> 	void (^completionHandler)(NSInteger result) = ^(NSInteger result)
> 	{
> 		if( result == NSFileHandlingPanelOKButton )
> 		{
>
> 			// do stuff with URL from panel (omitted)
> 		}
> 	};
>
>
> 	[op beginSheetModalForWindow:[self windowForSheet] completionHandler:completionHandler];
>
>
> But now when this code runs, the following is logged:
>
>
> 14/09/12 9:02:18.578 AM WindowServer[108]: CGXSetWindowShape: Operation on a window 0xf87 requiring rights kCGSWindowRightOwner by caller Artboard
> 14/09/12 9:02:18.578 AM Artboard[47282]: _NXPlaceWindow: error setting window shape (1001)
> 14/09/12 9:02:18.583 AM com.apple.security.pboxd[47286]: <FI_TSidebarSplitView: 0x7fd3e34728c0>: the delegate <FI_TSidebarSplitterController: 0x7fd3e346ce50> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:
> 14/09/12 9:02:18.584 AM com.apple.security.pboxd[47286]: Split view bounds: {{0, 0}, {0, 0}}
> 14/09/12 9:02:18.584 AM com.apple.security.pboxd[47286]:     Subview frame: {{0, 0}, {-316, 0}}
> 14/09/12 9:02:18.584 AM com.apple.security.pboxd[47286]:     Subview frame: {{-315, 0}, {315, 0}}
> 14/09/12 9:02:18.585 AM com.apple.security.pboxd[47286]: The subview frames are not in the same order as the subviews array. NSSplitView requires that these orders be kept consistent, otherwise behavior is undefined.
>
>
>
> Anyone got this simple use of NSOpenPanel to work with sandboxing?

Yes. Does this same code work OK outside the sandbox? Is there any likely looking preference file related to open/save panels you can try deleting?


_______________________________________________

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: Another sandboxing snafu
      • From: Graham Cox <email@hidden>
References: 
 >Another sandboxing snafu (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Hints for supporting dragging a file onto the dock icon, then onto a row in menu presented at that point?
  • Next by Date: Re: Sandboxing not so bad
  • Previous by thread: Another sandboxing snafu
  • Next by thread: Re: Another sandboxing snafu
  • Index(es):
    • Date
    • Thread