FileBrowserComponent::getSelectedFile ... what?


I select a file in my FileBrowserComponent and respond to the selectionChanged() by querying getNumSelectedFiles(), which always tells me 0.

I have multi select enabled, and I am selecting multiple files, but it doesn't work.  The getNumSelectedFiles(), that is.  The options are open, select file, tree, and multi-select.

If I don't have mutiselect, I always get '1', but the value from getSelectedFile() seems to always be the directory name in the dir. box.  I don't see how that's helpful.

Can we add an accessor to return an array of files instead?  Or at least make it clear what is supposed to happen with the getNumSelectedFiles()?  The code in the FileBrowserComponent looks odd to me.



Returning an Array is a good idea, I might change it when I get a moment.

But I don't see a problem with the code that's there - if you look inside the FileBrowserComponent::getSelectedFile() method you'll see that it only returns the root folder if the filename box is empty, which is correct behaviour because that's what you'd want to happen if someone double-clicks on a folder (which changes to that folder) then hits the "ok" button.