I have an application I'm developing in cocoa, and I have a problem with NSPathControl.
I set the style of the control to Popup, and when I launch my App and click on the path control, it shows me a popup menu with the components of the URL I set. I.e., for URL like file://localhost/Applications/Games/ it shows me the following: My Macbook, Macintosh HD, Applications, Games.
Now, when I click on Applications, I receive an action, and whithin that action [[sender clickedPathComponentCell] URL] returns correct URL: file://localhost/Applications/.
Problem 1:
But when I click on Macintosh HD, I get an URL with double trailing slash: file://localhost//.
Problem 2: is that I get the same URL file://localhost// when I click on My Macbook item. So, I have 2 questions:
Why does the URL to
Macintosh HDends with double slash?How can I distinguish clicks on
Macintosh HDandMy Macbook, and what is the correct URL toMy Macbook, where Finder shows the list of mounted volumes (on my macbook it isMacintosh HDandBOOTCAMP)?
I've examined the tutorial named "SourceView", but there was no item like My Macbook, so I was not able to find out, whether My Macbook is really exists as a some kind of virtual folder, or I should just use NSFileManager to get the list of mounted volumes.