-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot open FXML in SB after adding margin property to a custom control #44
Comments
Original comment by Haraldur Haraldsson (Bitbucket: haraldur, GitHub: haraldur): Sorry if I was not clear, if you add a custom component to a HBox or VBox and use the margin property, then the file will not open again. I have now tested this with my own custom controls and some JFXtras (e.g. SimpleMetroArcGauge). |
Original comment by Andre Krause (Bitbucket: akrause, GitHub: akrause): So i reproduced this behaviour, but it seems that this is not a problem with the SceneBuilder. The fxml is loaded with a javafx function FXMLLoader.load(). The exception is thrown, because something failed in this function. So the conclusion is, that this is a javafx bug. There is already a PR in the Java bugtracker, although it is with VBox.margin this should be the same behaviour. |
Original comment by Eber Geiss (Bitbucket: Ebergeiss, GitHub: Unknown): Hi Haraldur, I know I'm late. I got the same error. The creepy thing is that this Error does not appear everytime but once the Error appears you have to remove the margins in the sourcecode. The bad news: Sadly, that isn't a usable solution because your work is lost. The good news:** I got a new Solution**! Just open the Scene Builder as a normal Programm and without *.fxml-File. The you press "file -> Open..." or "Ctrl + O" and load the file by hand. King Regards |
#44) SB-235: Fixed wrong i18n bundle and minor fixes Approved-by: Joeri Sykora <[email protected]>
Originally reported by: Haraldur Haraldsson (Bitbucket: haraldur, GitHub: haraldur)
If you add a margin to a custom control in Scene Builder (or FXML code) and then close it, the next time you try to open it, you get a LoadException:
"Could not open '*****.fxml' - Open operation has failed. Make sure that the chosen file is a valid FXML document."
To fix it you have to remove the "HBox.margin" property manually from the custom control in the FXML code.
NB. this error is only related to opening the file in Scene Builder, to build and run in java(fx) there are no issues.
The text was updated successfully, but these errors were encountered: