*
* <pre>
* {@code
- * filename = application.fileOpenBox("/path/to/file.ext",
+ * filename = fileOpenBox("/path/to/file.ext",
* TFileOpenBox.Type.OPEN);
* if (filename != null) {
* ... the user selected a file, go open it ...
File selectedDir = ((TDirectoryTreeItem) item).getFile();
try {
directoryList.setPath(selectedDir.getCanonicalPath());
+ entryField.setText(selectedDir.getCanonicalPath());
if (type == Type.OPEN) {
openButton.setEnabled(false);
}
private void checkFilename(final String newFilename) throws IOException {
File newFile = new File(newFilename);
if (newFile.exists()) {
- if (newFile.isFile()) {
+ if (newFile.isFile() || (type == Type.SELECT)) {
filename = newFilename;
getApplication().closeWindow(this);
return;