Skip to content
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

Default instance property is not applicable to this element #30

Closed
ennerf opened this issue May 25, 2023 · 1 comment
Closed

Default instance property is not applicable to this element #30

ennerf opened this issue May 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ennerf
Copy link

ennerf commented May 25, 2023

I just ran into the following issue in 6.0.1. Setting a margin in SceneBuilder:

image

generates the following fxml:

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.HBox?>

<HBox xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
   <children>
      <Button text="Button">
         <HBox.margin>
            <Insets top="10.0" />
         </HBox.margin>
      </Button>
   </children>
</HBox>

Compiling this results in

[ERROR] /<path>/CompileFxml.java:[22,8] Default instance property is not applicable to this element.
[ERROR]   file:/<path>/margintest.fxml:12
@Paullo612 Paullo612 self-assigned this May 25, 2023
@Paullo612 Paullo612 added the bug Something isn't working label May 25, 2023
Paullo612 added a commit that referenced this issue May 27, 2023
@Paullo612
Copy link
Owner

Missed this part of static properties handling for some reason. Fixed. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants