TextFormatAlign inconsistency

I’ve just noticed something strange.

In OpenFL Legacy TextFieldFormat is a static class with STRINGS as properties.

In Flash TextFieldFormat is an enum (probably), but still a type.

This means that if you want to pass a TextFieldFormat as argument to a function you have to put it as Dynamic to compile

function test(?align:Dynamic=null)

or as something like this

function test(?align:#if flash flash.display.TextFormatAlign #else String = null #end)

It does looks good, doesn’t it?


In OpenfFL NEXT it is an Enum, so the problem vanish.


It should be the same in legacy unless I haven’t understood anything, and in that case you have to forgive me :wink: