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

    bright-gpu-74537

    06/17/2019, 10:23 AM
    yeah, i can defo reproduce the issue... fixing now
  • b

    bitter-family-72722

    06/17/2019, 10:25 AM
    huh

    https://i.imgur.com/NcjbOvR.pngā–¾

  • b

    bitter-family-72722

    06/17/2019, 10:25 AM
    that's when I build with rc.2 instead of rc.3
  • b

    bright-gpu-74537

    06/17/2019, 10:25 AM
    right, so rc2 + 4.0.19 (or less)
  • b

    bitter-family-72722

    06/17/2019, 10:26 AM
    so it might be a bug with hxcpp backwards-compatibility
  • b

    bitter-family-72722

    06/17/2019, 10:27 AM
    (usually hxcpp tries to be backwards-compatible for quite a few Haxe releases)
  • b

    bright-gpu-74537

    06/17/2019, 10:57 AM
    ok, @fierce-restaurant-45913 - that should be fixed now (latest git
    new-component-method
    )
  • b

    bright-gpu-74537

    06/17/2019, 10:57 AM
    was a good one šŸ˜‰
  • b

    bright-gpu-74537

    06/17/2019, 10:58 AM
    so, wrt to your app, you defo should remove the
    .hbox { width:100%; }
    from the css
  • b

    bright-gpu-74537

    06/17/2019, 10:58 AM
    i see you have this, also:
  • b

    bright-gpu-74537

    06/17/2019, 10:58 AM
    hbox3.addClass("hbox");
  • b

    bright-gpu-74537

    06/17/2019, 10:59 AM
    so, that is why you have the css there, so i get it... however, the "hbox" class is always added to the hbox's
  • b

    bright-gpu-74537

    06/17/2019, 10:59 AM
    ie, the name of the class is added, so a
    Button
    will respond to the
    .button
    style, etc
  • b

    bright-gpu-74537

    06/17/2019, 11:00 AM
    so you can either change that css rule to, i dunno, "myhbox" and then
    hbox3.addClass("myhbox");
  • b

    bright-gpu-74537

    06/17/2019, 11:00 AM
    or,
    hbox3.percentWidth=100
  • b

    bright-gpu-74537

    06/17/2019, 11:00 AM
    (up to you)
  • b

    bright-gpu-74537

    06/17/2019, 11:01 AM
    also, if i might be so bold... i have a suggestion for using custom components for your app, rather than this huge list of manually creating components in code... ... feel free to ignore the follow suggestion 😃
  • b

    bright-gpu-74537

    06/17/2019, 11:01 AM
    so you have this in a loop:
  • b

    bright-gpu-74537

    06/17/2019, 11:02 AM
    https://pastebin.com/iug7ZK7u
  • b

    bright-gpu-74537

    06/17/2019, 11:03 AM
    thats fine, but i would be easier to create a custom component out of that, and just reuse it, eg:
  • b

    bright-gpu-74537

    06/17/2019, 11:05 AM
    xml:
  • b

    bright-gpu-74537

    06/17/2019, 11:05 AM
    Copy code
    xml
    <grid columns="2">
        <label text="Some label" />
        <textfield id="tf1" />
    
        <label text="Some other label" />
        <textfield id="tf2" />
    </grid>
  • b

    bright-gpu-74537

    06/17/2019, 11:05 AM
    class:
  • b

    bright-gpu-74537

    06/17/2019, 11:05 AM
    Copy code
    haxe
    @:build(haxe.ui.macros.ComponentMacros.build("assets/myfragment.xml"))
    class Something extends Box {
    }
  • b

    bright-gpu-74537

    06/17/2019, 11:05 AM
    usage:
  • b

    bright-gpu-74537

    06/17/2019, 11:06 AM
    Copy code
    haxe
    for (...) {
        var f = new Something();
        f.tf1.text = "foo";
        f.tf2.text = "bar";
        scrollview.addComponent(f);
    }
  • b

    bright-gpu-74537

    06/17/2019, 11:06 AM
    anyway, just a suggestion, but the original issue is fixed anyway 😃
  • f

    fierce-restaurant-45913

    06/17/2019, 11:09 AM
    ^^
  • b

    bright-gpu-74537

    06/17/2019, 11:23 AM
    more info here: https://github.com/haxeui/haxeui-guides/blob/master/custom-components.md
  • b

    brave-kangaroo-30399

    06/17/2019, 11:55 AM
    I’m confused, is the only issue in round rect or is there something else?
1...666768...1687Latest