On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <girba@iam.unibe.ch> wrote:
Hi,
I need to load a file from the disk.
I am invoking: UIManager default chooseFileMatching: '*.mse' label: 'Import model from MSE file.'.
The problem is that I do not see any files, even though I have files with .mse ending in the directory. Also, even if I pass '*.*' I still cannot see the files (only the directories).
Could anyone tell me what I am doing wrong?
I could reproduce it and debugging I noticed that FileDialogWindow>>validExtensions: aList "Set the filter for the files to be those with the given extensions." aList notEmpty ifTrue: [self defaultExtension: aList first]. self fileSelectionBlock: [:de | de isDirectory ifTrue: [self showDirectoriesInFileList] ifFalse: [(self fileNamePattern match: de name) and: [ aList includes: (FileDirectory extensionFor: de name asLowercase)]]] I think there can be a problem with this method. Here, aList will be '*.*' and as you can imagine that string doesn't includes any of the extensions. Perhaps we can change that include for a match: or something like that. To see this, remove the line aList includes: (FileDirectory extensionFor: de name asLowercase and you will see that now all the files are shown. we should open a ticket but I don't know if this should be 1.0 tag best, Mariano
Cheers, Doru
-- www.tudorgirba.com
"Next time you see your life passing by, say 'hi' and get to know her."
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project