Paullo612 / mlfx

OpenJFX's FXML language AOT compler
Apache License 2.0
11 stars 0 forks source link

Default instance property is not applicable to this element #30

Closed ennerf closed 1 year ago

ennerf commented 1 year ago

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 commented 1 year ago

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