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

    bright-gpu-74537

    11/18/2019, 10:03 AM
    but
  • b

    bright-gpu-74537

    11/18/2019, 10:04 AM
    Copy code
    xml
    <my-calendar>
        <data>
            <item date="..." />
            <item date="..." />
        </data>    
    </my-calendar>
  • b

    bright-gpu-74537

    11/18/2019, 10:04 AM
    would be neat
  • h

    handsome-television-62908

    11/18/2019, 10:04 AM
    yeah honestly if I can pull off a rough draft of my app before my times up I will definitely by sticking with haxeui past this prototyping phase
  • h

    handsome-television-62908

    11/18/2019, 10:05 AM
    well, I'm pretty convinced as-is, so I'm probably going to be sticking with it anyhow. There's just a lot to learn and it's a little intimidating starting out haha
  • b

    bright-gpu-74537

    11/18/2019, 10:06 AM
    true enough... just FYI "all" you would have to do is implement
    IDataComponent
    in your custom component
  • b

    bright-gpu-74537

    11/18/2019, 10:06 AM
    but anyway... out of scope 🙂
  • h

    handsome-television-62908

    11/18/2019, 10:08 AM
    It's really killing me that I need to do this app so fast because I would be more than willing to take the time to build this a more "correct" way like you're suggesting lol. That's way more maintainable - but hopefully my "good enough" point will be not too much of a pain to refactor
  • b

    bright-gpu-74537

    11/18/2019, 10:19 AM
    well... ... i couldnt resist
  • b

    bright-gpu-74537

    11/18/2019, 10:19 AM
    Copy code
    xml
    <vbox style="padding: 5px;">
        <my-calendar width="500" height="500">
            <data>
                <item left="0" top="0" width="100%" height="40" text="Item 1" />
                <item left="0" top="50" width="300" height="250" text="Item 2" />
                <item left="60" top="20" width="270" height="140" text="Item 3" />
            </data>
        </my-calendar>
    </vbox>
  • b

    bright-gpu-74537

    11/18/2019, 10:21 AM
    obviously its not the "real" deal, but its a nice example of a custom component, coming from xml, with a data source
  • h

    handsome-television-62908

    11/18/2019, 10:30 AM
    That's not too scary looking! I'll be looking to copy that pretty soon then 😃 - once I got this calendar doing some things I'm looking for that'll be good, thanks man!
  • b

    bright-gpu-74537

    11/18/2019, 10:30 AM
    ... and a native windows app... for fun
  • b

    bright-gpu-74537

    11/18/2019, 10:30 AM
    😄
  • b

    bright-gpu-74537

    11/18/2019, 10:30 AM
    no worries... couldnt resist adding IDataComponent... just to make sure it worked as i thought it would have
  • h

    handsome-television-62908

    11/18/2019, 10:33 AM
    I do plan on making those blocks resizable/movable; would it still make sense to do the data-variant of the component?
  • h

    handsome-television-62908

    11/18/2019, 10:34 AM
    (design question for near future lol)
  • b

    bright-gpu-74537

    11/18/2019, 10:34 AM
    sure... the UI could then just update item in data source
  • h

    handsome-television-62908

    11/18/2019, 10:35 AM
    Great, there's a lot of power to HaxeUI I've yet to learn, but I'm very happy to see just how flexible it can be
  • f

    flaky-scientist-22842

    11/18/2019, 10:36 AM
    Yeah, it's pretty fl__haxe__ible!
  • f

    flaky-scientist-22842

    11/18/2019, 10:36 AM
    🎺
  • b

    bright-gpu-74537

    11/18/2019, 10:37 AM
    heh heh
  • b

    bitter-family-72722

    11/18/2019, 10:43 AM
    I think you mean haxcellent
  • b

    bright-gpu-74537

    11/18/2019, 10:44 AM

    https://youtu.be/bcYppAs6ZdIâ–¾

  • h

    handsome-television-62908

    11/18/2019, 11:04 AM
    It looks like the old HaxeUI used to have a bunch of methods for components to hook on to events. I'm looking for what used to be component.onMouseUp, but it doesn't seem to be a thing anymore . . . I can accomplish this for a single component using
    @:bind(..,MOUSE_UP)
    but this isn't going to scale; am I doing something wrong? In the existing documentation all there is for most components is onClick/RightClick or onChange . . .
  • h

    handsome-television-62908

    11/18/2019, 11:05 AM
    The second closest thing I could find was a lot of related code for classes that extend
    haxe.ui.events.Events
    , but that can't be what I'm looking for
  • h

    handsome-television-62908

    11/18/2019, 11:06 AM
    Ah! okay, so registerEvent is what I'm looking for? https://community.haxeui.org/t/how-do-i-connect-a-button-click-to-my-code/92/3
  • b

    bright-gpu-74537

    11/18/2019, 11:07 AM
    registerEvent
    yeah...
  • b

    bright-gpu-74537

    11/18/2019, 11:07 AM
    the onXYZ are just shortcuts to that
  • b

    bright-gpu-74537

    11/18/2019, 11:08 AM
    i could add the onMouseUp, etc... they arent hard (macros add them)
1...142143144...1687Latest