On Sep 13, 2012, at 4:15 PM, Graham Cox <graham....@bigpond.com> 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. This logging indicates a bug in the frameworks. If you can reproduce it, please log your app and reproducible steps to bugreporter.apple.com. thanks!! corbin > > > > Anyone got this simple use of NSOpenPanel to work with sandboxing? > > > --Graham > > > > _______________________________________________ > > 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/corbind%40apple.com > > This email sent to corb...@apple.com _______________________________________________ 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