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
<cocoa-dev@lists.apple.com> 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 (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/dev.iceberg%40gmail.com
>
> This email sent to dev.iceb...@gmail.com



-- 
Packaging Resources - http://s.sudre.free.fr/Packaging.html
_______________________________________________

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

Reply via email to