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

    handsome-television-62908

    11/18/2019, 9:16 AM
    Yes that's right
  • b

    bright-gpu-74537

    11/18/2019, 9:16 AM
    yeah, scrollmode
  • h

    handsome-television-62908

    11/18/2019, 9:17 AM
    just saw that property - was wondering what that was haha
  • b

    bright-gpu-74537

    11/18/2019, 9:17 AM
    @:behaviour(ScrollModeBehaviour, ScrollMode.DRAG)   public var scrollMode:ScrollMode;
  • b

    bright-gpu-74537

    11/18/2019, 9:17 AM
    Copy code
    haxe
    @:enum
    abstract ScrollMode(String) from String to String {
        var NORMAL = "normal";
        var DRAG = "drag";
        var INERTIAL = "inertial";
    }
  • b

    bright-gpu-74537

    11/18/2019, 9:18 AM
    "normal" means that you have to use the scrollbar and the listcontents wont initiate scrolling
  • b

    bright-gpu-74537

    11/18/2019, 9:18 AM
    so back to the properties, you mean something like:
  • b

    bright-gpu-74537

    11/18/2019, 9:18 AM
    Copy code
    xml
    <vbox>
        <property id="buttonText" bind="theButton.text" />
        <button id="theButton" />
    </vbox>
  • b

    bright-gpu-74537

    11/18/2019, 9:18 AM
    and then you can do:
  • b

    bright-gpu-74537

    11/18/2019, 9:19 AM
    <my-custom-component buttonText="bob" />
  • h

    handsome-television-62908

    11/18/2019, 9:19 AM
    Thanks!! That definitely seems to do the trick -- and it's good to see my list dragging hasn't broken yet with the view shifted* haha
  • h

    handsome-television-62908

    11/18/2019, 9:20 AM
    That's definitely a solution! seems fairly haxeui-like 😃
  • b

    bright-gpu-74537

    11/18/2019, 9:20 AM
    😄
  • b

    bright-gpu-74537

    11/18/2019, 9:21 AM
    ill have a think about it and see about implementing it... it probably is more useful that having the ability to add "full blown" code via xml
  • h

    handsome-television-62908

    11/18/2019, 9:21 AM
    if that is the case though . . . it reminds me that i did try something like
    <my-component theButton.text="...">
    thinking maybe ids were the key haha
  • b

    bright-gpu-74537

    11/18/2019, 9:21 AM
    yeah, that aint gonna work
  • b

    bright-gpu-74537

    11/18/2019, 9:22 AM
    not even sure the xml parser would allow it, but haxeui macros certainly wont do anything with it
  • b

    bright-gpu-74537

    11/18/2019, 9:22 AM
    it'll be looking for a property on "mycomponent" of "theButton.text", rather than a member of "theButton"
  • b

    bright-gpu-74537

    11/18/2019, 9:22 AM
    it could probably be added to be fair, but i dont like it
  • b

    bright-gpu-74537

    11/18/2019, 9:22 AM
    😄
  • b

    bright-gpu-74537

    11/18/2019, 9:23 AM
    that said, ya know, if we really think that would add value then we can add it
  • h

    handsome-television-62908

    11/18/2019, 9:25 AM
    I think that would be a bad idea to support that style haha - it seems like invalid xml and probably looks unnatural to anyone used to it
  • b

    bright-gpu-74537

    11/18/2019, 9:25 AM
    agreed
  • b

    bright-gpu-74537

    11/18/2019, 9:25 AM
    so, thinking about that thing... all the bits are basically already there i think
  • b

    bright-gpu-74537

    11/18/2019, 9:25 AM
    essentially all that needs to be done is to turn:
  • b

    bright-gpu-74537

    11/18/2019, 9:26 AM
    <property id="buttonText" bind="theButton.text" />
  • b

    bright-gpu-74537

    11/18/2019, 9:26 AM
    into:
  • h

    handsome-television-62908

    11/18/2019, 9:26 AM
    one second though
  • b

    bright-gpu-74537

    11/18/2019, 9:26 AM
    @:bind(theButton.text) public var buttonText:String
  • b

    bright-gpu-74537

    11/18/2019, 9:26 AM
    in the generated haxe class
1...140141142...1687Latest