Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textbox Inputs are extremely buggy #5

Closed
XANOZOID opened this issue Feb 18, 2024 · 3 comments
Closed

Textbox Inputs are extremely buggy #5

XANOZOID opened this issue Feb 18, 2024 · 3 comments

Comments

@XANOZOID
Copy link
Contributor

I took the Using a build macro section from HaxeUI's website and added it to my app. It had a textbox so I figured I could type in it. Typing basically didn't work at all, not even slightly. It either didn't respond at all, or it took some weird input behavior to get it render anything I typed since it last updated. It worked smoothly with the buttons though.

This is the code I used, with the latest core/ceramic versions:

<hbox>
    <textfield id="textfield" text="0" />
    <button id="deinc" text="-" />
    <button id="inc" text="+" />
</hbox>
import haxe.ui.events.MouseEvent;
import haxe.ui.containers.HBox;

@:build(haxe.ui.ComponentBuilder.build("../../assets/my-component.xml"))
class MyComponent extends HBox {
    @:bind(textfield.text)
    public var textfieldText:String = "10";

    @:bind(deinc, MouseEvent.CLICK)
    function onDeinc(e) {
        var n = Std.parseInt(textfieldText) - 1;
        textfieldText = Std.string(n);
    }    

    @:bind(inc, MouseEvent.CLICK)
    function onInc(e) {
        var n = Std.parseInt(textfieldText) + 1;
        textfieldText = Std.string(n);
    }    
}
@XANOZOID
Copy link
Contributor Author

I might also add this seems pretty similar to what I've experienced in the past with Kha. Apparently getting textfields working on these backends are difficult.

Check this out for reference: haxeui/haxeui-kha#63

@Jarrio
Copy link
Owner

Jarrio commented Feb 18, 2024

I might also add this seems pretty similar to what I've experienced in the past with Kha. Apparently getting textfields working on these backends are difficult.

Check this out for reference: haxeui/haxeui-kha#63

I am using text fields and so are other users. I'm not sure what's going on for you, but I'd make sure you've ran through the readme properly.

I didn't make the text input, I'm using ceramic's built in text input which he uses as well. I'll have a look at the sample

@Jarrio
Copy link
Owner

Jarrio commented Feb 18, 2024

could you send a gif of what's going on? it seems to work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants