I am new to programming for Mac, so forgive me if my question is too silly.
I am writing a small application, where I need to set a destination folder.
I think, instead of just using a NSButton “Choose folder”, the approach that Firefox or Safari with their “Save as…” dialogs take is a very user friendly one.
Using a NSPopUpButton, where one can pick a folder from the user’s favorites, or from the last used folders. Additionally I would add a top-most entry “Choose…”, what would open a NSOpenPanel.
My question is: How can I get the user’s favorite folders, that are shown e.g. in the Finder application, and populate my NSPopUpButton with them?
Here how it looks like in Firefox:

You can find the relevant functions inside the Application Services framework, and you can get the list of items like this:
When I run this on my computer, I get:
Which corresponds to: