So this is an implementation detail of how haxeui works and how it can handle native components and multiple backends. Simply put there are two “types” of controls.
There are “composite” components in which the the internals are all handle by haxeui, and the drawing is delegated to a backend (like openfl, or kha, or html).
Then there are “native” components where the Component class is essentially a wrapper around a native component (like wxwidgets, qt, android).
This is why there are “behaviors”. For native components (like wxwidgets) the behaviors are replaced by native behaviors defined in the backend. So even though there is a
RestrictCharsBehaviour, it wont be used because wx widgets is a native backend, and there fore textfield will NOT lead to a composite component, but rather a native component (wxTextField in this case).
Moreover, as you have noticed, its likely that some or most of the composite behaviors rely on that component having certain children, or properties etc. Which wouldnt be the case for native components.
Basically, the behaviors in haxeui-core are for composite components, which native platforms are not. The config for how behaviors and wrappers are created for haxeui-hxwidgets textfield can be seen here: https://github.com/haxeui/haxeui-hxwidgets/blob/master/haxe/ui/backend/native.xml#L94-L106
As you can see, the “restrictChars” behavior is replaced with “DefaultBehaviour” so, wont do anything.