You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user has deleted a directory that formerly existed as a preference, the PreferencesFX dialog prevents the user from choosing a different directory.
Replicate
Create a PreferencesFX controller with a file selection option, such as:
In the figure, the path c:\cygwin\home\Dave used to exist, but no longer exists.
Click Browse to change the directory.
Expected
The file picker dialog appears, allowing the user to choose a different directory. Since the initial directory doesn't exist, the default should be set to something reasonable (such as System.getProperty( "user.home" )).
Actual
No dialog appears.
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Folder parameter must be a valid folder
at javafx.graphics/com.sun.glass.ui.CommonDialogs.convertFolder(Unknown Source)
at javafx.graphics/com.sun.glass.ui.CommonDialogs.showFolderChooser(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.showDirectoryChooser(Unknown Source)
at javafx.graphics/javafx.stage.DirectoryChooser.showDialog(Unknown Source)
at com.dlsc.preferencesfx.formsfx.view.controls.SimpleChooserControl.lambda$initializeParts$0(SimpleChooserControl.java:143)
Applications must first verify that each directory exists before allowing PreferencesFX to attempt to change it. This is a brittle work around because users may still delete directories while the application is running, which would require a watch dog on the entire system.
System
Using JDK 19 with JavaFX 19 on WIndows 10.
The text was updated successfully, but these errors were encountered:
Description
When a user has deleted a directory that formerly existed as a preference, the PreferencesFX dialog prevents the user from choosing a different directory.
Replicate
Create a PreferencesFX controller with a file selection option, such as:
In the figure, the path
c:\cygwin\home\Dave
used to exist, but no longer exists.Click Browse to change the directory.
Expected
The file picker dialog appears, allowing the user to choose a different directory. Since the initial directory doesn't exist, the default should be set to something reasonable (such as
System.getProperty( "user.home" )
).Actual
No dialog appears.
Full stack trace is attached.
preferences-fx.txt
Work around
Applications must first verify that each directory exists before allowing PreferencesFX to attempt to change it. This is a brittle work around because users may still delete directories while the application is running, which would require a watch dog on the entire system.
System
Using JDK 19 with JavaFX 19 on WIndows 10.
The text was updated successfully, but these errors were encountered: