Re: Curious bug in oPanel under Mojave in screensaver
Re: Curious bug in oPanel under Mojave in screensaver
- Subject: Re: Curious bug in oPanel under Mojave in screensaver
- From: Stephane Sudre via Cocoa-dev <email@hidden>
- Date: Thu, 28 May 2020 19:46:40 +0200
It's a known issue in all 10.14 versions and some 10.15 versions.
Apple broke NSOpenPanel when they sandboxed the screensaver pref pane.
They also broke window focus BTW.
2 issues can be observed:
- you select a file, you get the parent folder.
- you switch to the list view mode and you can freeze/crash the System
Preferences application.
Basically, 10.14 and 10.5 have been huge nightmares when it comes to
screen savers.
On Thu, May 28, 2020 at 1:40 PM Gabriel Zachmann via Cocoa-dev
<email@hidden> wrote:
>
> I have screensaver where the user can select a folder through the options
> sheet.
> In that sheet, I open an NSOpenPanel, make a few settings, runModal,
> let the user navigate and choose a folder, then get oPanel.URL.
> (Complete code below.)
>
> The curious thing is:
> The oPanel returns only the folder that appeared at the top of the dialog in
> the dropdown.
> In other words, when a user navigates to some folder A, then clicks on a
> folder B inside A,
> then closes the panel (clicking "Open"), then oPanel.URL still returns A.
> The user has to navigate *into* B for the oPanel to return B.
>
> This funny behavior seems to occur only under Mojave (not Catalina),
> and it seems to occur only in the screensaver.
> Exactly the same code under Mojave works as expected when used in a
> stand-alone app.
>
> My question is: does anyone have an idea what might be causing this?
> Am I missing something?
> Or is it "just" a bug in AppKit or the screensaverengine under Mojave?
>
> Thanks a lot in advance for all kinds of hints and insights.
>
> Best regards, Gabriel
>
>
> Enc:
>
> Complete code for my open dialog:
>
> NSOpenPanel *oPanel = [NSOpenPanel openPanel];
> [oPanel setDirectoryURL: dir];
> [oPanel setAllowsMultipleSelection: NO];
> [oPanel setCanChooseDirectories: YES];
> [oPanel setCanChooseFiles: NO];
> long int result = [oPanel runModal];
> new_url = oPanel.URL;
>
>
>
> _______________________________________________
>
> 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
--
Packaging Resources - http://s.sudre.free.fr/Packaging.html
_______________________________________________
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