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

    bright-gpu-74537

    11/18/2019, 12:56 PM
    @:event(ItemEvent.COMPONENT_EVENT)                          public var onComponentEvent:ItemEvent->Void;
  • b

    bright-gpu-74537

    11/18/2019, 12:57 PM
    the reason you dont find it anywhere is because nothing calls that... it will simply use "dispatchEvent(ItemEvent.COMPONENT_EVENT)"
  • b

    bright-gpu-74537

    11/18/2019, 12:57 PM
    that event, in case there is a misunderstanding, is when you have a custom listview renderer that has sub components in it... so you can get events from them
  • b

    bright-gpu-74537

    11/18/2019, 12:58 PM
    onXYZ are just sugar generally
  • b

    bright-gpu-74537

    11/18/2019, 12:58 PM
    its a shortcut for
    registerEvent(...)
    , keep in mind though, you can only have one, so:
  • b

    bright-gpu-74537

    11/18/2019, 12:59 PM
    Copy code
    myButton.onClick = ...
    myButton.onClick = ...
  • b

    bright-gpu-74537

    11/18/2019, 12:59 PM
    this will result in a single event listener, ie, the last one you assigned
  • b

    bright-gpu-74537

    11/18/2019, 12:59 PM
    Copy code
    myButton.registerEvent(...)
    myButton.registerEvent(...)
  • b

    bright-gpu-74537

    11/18/2019, 12:59 PM
    will result in two event listeners
  • h

    handsome-television-62908

    11/18/2019, 1:02 PM
    Thanks, Ian! That makes sense, and yeah I was looking for it because I was thinking I wanted to do some custom events of my own for my components :)
  • b

    bright-gpu-74537

    11/18/2019, 1:03 PM
    that live inside a listview?
  • h

    handsome-television-62908

    11/18/2019, 1:04 PM
    No... I was going to try to copy the pattern eventually if it was simple enough. What I was doing is making my own "sortable" list view
  • b

    bright-gpu-74537

    11/18/2019, 1:04 PM
    right... gotcha
  • b

    bright-gpu-74537

    11/18/2019, 1:04 PM
    sortable list sounds interesting... i wonder if the data source should have a "sort" function
  • h

    handsome-television-62908

    11/18/2019, 1:04 PM
    It is working with a rudimentary drag and drop atm, I plan on it being able to drag and drop into multiple sections eventually
  • h

    handsome-television-62908

    11/18/2019, 1:05 PM
    Sorry, it's DND sortable*
  • b

    bright-gpu-74537

    11/18/2019, 1:05 PM
    gotcha
  • h

    handsome-television-62908

    11/18/2019, 1:05 PM
    but also that sounds like a good feature too
  • b

    bright-gpu-74537

    11/18/2019, 1:05 PM
    sort still sounds useful on data source
  • b

    bright-gpu-74537

    11/18/2019, 1:05 PM
    yeah
  • h

    handsome-television-62908

    11/18/2019, 1:30 PM
    should min-height style work for vbox?
  • h

    handsome-television-62908

    11/18/2019, 1:30 PM
    It doesn't seem to do anything while height does . . .
  • b

    bright-gpu-74537

    11/18/2019, 2:10 PM
    can you open a ticket maybe with a test app - in meetings at the moment
  • h

    handsome-television-62908

    11/18/2019, 2:13 PM
    Will do asap! I have work in about 30ish minutes ... I didn't sleep today :D
  • b

    bright-gpu-74537

    11/18/2019, 2:46 PM
    @User - you said textfield doest dispatch UIEvent.CHANGE, correct? It does for me
  • b

    bright-gpu-74537

    11/18/2019, 2:46 PM
    at least on haxeui-html5 - ill try haxeui-kha
  • b

    bright-gpu-74537

    11/18/2019, 2:48 PM
    ok, it doesnt seem to on kha
  • b

    bright-gpu-74537

    11/18/2019, 3:33 PM
    fixed in
    haxeui-kha:1.0.3
  • u

    user

    11/18/2019, 4:18 PM
    Great. Will git pull. Thanks again :)
  • u

    user

    11/21/2019, 5:47 PM
    @bright-gpu-74537 Came across this error while using numbersteppers in kha: https://github.com/haxeui/haxeui-kha/issues/37
1...144145146...1687Latest