Skip to content

Commit

Permalink
explicitly add hidden to RTTI (its not a behaviour so wont happen auto)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jul 28, 2024
1 parent 47c540b commit 285d82d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions haxe/ui/macros/Macros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,14 @@ class Macros {
}
}

// "hidden" isnt actually a behaviour (currently), however, we would like it in the RTTI so we can do
// automatic type conversions, but since its just a normal getter / setter it will never be included
// in this code, so we'll add it manually - it might make sense later to have some @:add-rtti type
// metadata, but for now, an explicit, obvious list is clearer
if (builder.fullPath == "haxe.ui.core.Component") {
RTTI.addClassProperty(builder.fullPath, "hidden", "bool");
}

for (f in fields) {
RTTI.addClassProperty(builder.fullPath, f.name, ComplexTypeTools.toString(f.type));
if (f.name == valueField) {
Expand Down

0 comments on commit 285d82d

Please sign in to comment.