https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    brainy-machine-50829

    11/10/2019, 11:33 AM
    And checking if local states end up being the same. Soooo many little bugs caught by that after I thought it was working alright.
  • b

    brainy-machine-50829

    11/10/2019, 11:37 AM
    Looking at the tests I did, just having 3 clients each add item, edit it, then undo both, then redo both...
  • b

    brainy-machine-50829

    11/10/2019, 11:38 AM
    All the permutations of confirmations, and ending with the same result, whatever that is. 😄
  • b

    brainy-machine-50829

    11/10/2019, 11:39 AM
    I think I will have nightmare again tonight...
  • b

    bright-gpu-74537

    11/10/2019, 11:44 AM
    haha
  • b

    bright-gpu-74537

    11/10/2019, 11:44 AM
    easy option: remove the undo button
  • b

    bright-gpu-74537

    11/10/2019, 11:44 AM
    😄
  • b

    brainy-machine-50829

    11/10/2019, 11:47 AM
    I've seriously thought about that a couple of times. 😄
  • r

    rough-intern-85347

    11/11/2019, 12:06 PM
    @bright-gpu-74537 I guess that being forced to add all controls to a new instance of a Toolkit spooked me 😅
  • b

    bright-gpu-74537

    11/11/2019, 12:14 PM
    Copy code
    haxe
            Toolkit.init();
            ui2 = new UI2(spiro); // <--- haxeui custom component "extends Box ... ... extends Component ... ... ... extends Sprite
            ui2.width = 230;
            addChild(ui2); // <--- openfls Sprite::addChild
  • b

    bright-gpu-74537

    11/11/2019, 12:14 PM
    you arent though, are you?
  • b

    bright-gpu-74537

    11/11/2019, 12:14 PM
    a component is just a sprite (in haxeui-openfl) so you can just add using addChild
  • b

    bright-gpu-74537

    11/11/2019, 12:15 PM
    Copy code
    haxe
    var b = new Button();  // haxeui
    b.text = "test";
    Lib.stage.current.addChild(b); // openfl
  • b

    bright-gpu-74537

    11/11/2019, 12:15 PM
    (for example)
  • b

    bright-gpu-74537

    11/11/2019, 12:21 PM
    ... ... maybe im not getting what you mean "forced to add all controls to a new instance of a Toolkit" 🙂
  • w

    wide-greece-63479

    11/11/2019, 6:33 PM
    @bright-gpu-74537 haxeui-kha for iOS now crashes at startup, OSX native scales weird now... Do you want github issues for these?
  • b

    bright-gpu-74537

    11/12/2019, 12:23 PM
    Hmmm... annoying... but android is better now? Issues sound great, easy to track that way
  • u

    user

    11/12/2019, 9:32 PM
    @bright-gpu-74537 So I am implementing onKeyDown for haxeui-kha, but when say pressing Enter the keycode gets called but my component is not affected(i.e. I put a trace and saw that it was called). What I am wondering is do I have to specify the keycodes for haxeui or should I transform values (i.e. The keycode in haxeui for Enter is 23 but in kha its 13) ? I will look around in the codebase maybe I am missing something. Just a note that I implemented it in ComponentImpl and in ScreenImpl.
  • u

    user

    11/12/2019, 9:33 PM
    I did Enter in a textfield( actually a textfield in a numberstepper but I imagine its the same code that gets executed)
  • u

    user

    11/12/2019, 10:07 PM
    Oh ok so for the textfield I see that you dont get Enter or LF as a valid value and return( is this intended flow ? shouldnt we end the text modification and remove focus from the textfield)
  • u

    user

    11/12/2019, 10:10 PM
    Ok just removing the return on LFcreates a bug(so that justifies it>)
  • u

    user

    11/12/2019, 10:30 PM
    I will investigate all of this later; For now I can get the enter to remove focus but the caret still draws(I imagine I should do a final render call before onBlur when pressing enter) As for the bug I am talking about; when removing the LF at line 511 and pressing the arrow keys while in a textfield the values will go up/down with up/down arrows dont know if this is desired but it happens :P\
  • b

    bright-gpu-74537

    11/13/2019, 8:05 AM
    So i guess the issues are two fold: one, the text input in haxeui-kha is totally custom in the sense that kha has no built in text input, so i had to build one... which as you can imagine, is a complex thing... so maybe that need some tweaks (been a long time since i looked at it)... and the second is if haxeui-core handles ENTER's in some special way, and what that special way should be
  • b

    bulky-insurance-39338

    11/14/2019, 12:47 AM
    is haxeui-CORE also handling the keyboard-inputs ? (for shortcuts setting?)
  • u

    user

    11/14/2019, 2:46 PM
    Yes and no. If you want to set shortcut for commands you just need to use KeyboardEvent which is implemented in core but the backend takes care of setting the keycode values depending on how the backend handles input for keyboard. For the user though usually you would do
    Copy code
    @:bind(myvbox,KeyboardEvent.KEY_DOWN) 
    function handleKeyInput(k:KeyboardEvent){trace(k.keyCode);}
    myvbox being a valid id in you xml file or class.
  • u

    user

    11/14/2019, 2:49 PM
    If your using kha I am currently implementing keyboard event handling
  • n

    nutritious-boots-87264

    11/14/2019, 2:51 PM
    Is
    @bind
    macro something that was added recently? Looks nicer than manual registerEvent.
  • u

    user

    11/14/2019, 2:54 PM
    Been there for some time now.
  • u

    user

    11/14/2019, 2:54 PM
    And yes its cleaner in code from my experience
  • b

    bright-gpu-74537

    11/14/2019, 3:42 PM
    you can also use it bind variables to control values (two way)
1...137138139...1687Latest