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;



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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