onFocusChange not work in xml?

http://haxeui.org/builder/?lfsmrf

         function onFocusChange(){
    //not work here?
        }

<textfield id="searchText" placeholder="search" width="400" onChange='onChange()' onFocusChange='onFocusChange()'/>

Hi Zhan !

I think it’s because you can put only the following functions in the xml ( not sure)

You can see them there Class - haxe.ui.components.TextField

onAnimationEnd:AnimationEvent->Void
onAnimationStart:AnimationEvent->Void
onChange:UIEvent->Void
onClick:MouseEvent->Void
onRightClick:MouseEvent->Void

@rationaldecay

I think there is Textfiled:onFocusChange event.

@ianharrigan how to write onFocusChange in xml?

So you are using the wrong event: Builder - HaxeUI

<vbox style="padding: 5px;">
    <script>
        function onIn() {
            trace("onIn");
        }

        function onOut() {
            trace("onOut");
        }
    </script>    
	<textfield onFocusIn="trace('in')" onFocusOut="trace('out')" />
	<textfield onFocusIn="onIn()" onFocusOut="onOut()"  />
</vbox>

weirdly, if you do use a non existing “on” property, then you dont get an error, eg:

<textfield onThisDoesntExist=".." />

Still compiles, and it shouldnt, so ill fix that.