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

    user

    02/18/2020, 12:58 PM
    I will have a look.
  • u

    user

    02/18/2020, 12:59 PM
    But its conceptually improbable that it would work because I create the parent first so the parent will probably be ready beforehand.
  • b

    bright-gpu-74537

    02/18/2020, 1:11 PM
    oh, maybe i misunderstood, you want the parent to fire an event when a child is added to it?
  • b

    bright-gpu-74537

    02/18/2020, 1:13 PM
    something akin to:
  • b

    bright-gpu-74537

    02/18/2020, 1:13 PM
    Copy code
    haxe
    var button = new Button();
    vbox.onChildAdded = function(e) {
        trace("child added to vbox");
    }
    vbox.addComponent(button);
  • b

    bright-gpu-74537

    02/18/2020, 1:13 PM
    (that doesnt work
    onChildAdded
    doesnt exist, i just mean as an example)
  • u

    user

    02/18/2020, 1:51 PM
    Yeah exactly. Do you think it would make sense to add this feature ? The plus is we can fetch stuff from the parent without needing to be markupped as such. In my situation I have Tabviews and I add tabs(or vboxes) to the tabview but the rendering in the tab depends on the tabview (custom rendering for scene preview) because the x,y, height and width are affected by the parenting.
  • b

    bright-gpu-74537

    02/18/2020, 2:08 PM
    yeah, i mean, it sounds like it cant hurt to add it, i havent ever had a need for it personally, but that doesnt mean its not useful, and it should be fair easy to add also
  • b

    bright-gpu-74537

    02/18/2020, 2:09 PM
    btw, something like this might have worked also:
  • b

    bright-gpu-74537

    02/18/2020, 2:09 PM
    Copy code
    haxe
    myChild.onReady = function(e) {
        myChild.findAncestor(TabView).something;
    }
  • b

    bright-gpu-74537

    02/18/2020, 2:10 PM
    (if you wanted to comm with the parents of n-levels)
  • b

    bright-gpu-74537

    02/18/2020, 2:11 PM
    it works like findComponent, can be a class, a css name, an id... or a combination
  • n

    nutritious-boots-87264

    02/19/2020, 10:02 AM
    Tableview currently doesn't implement multiselection. I have a more or less working version with code ported from listview. @User Would you consider such approach acceptable and I can make a PR or do you think that common behavior needs to be refactored into separate module?
  • b

    bright-gpu-74537

    02/19/2020, 10:04 AM
    really? Multiselect doesnt exist for tableview? I thought it was... i would say keep it specific for tableview for now, even though it is duplication... it can be refactored out should it need be...
  • n

    nutritious-boots-87264

    02/19/2020, 10:05 AM
    Good, then I will do a bit more testing and create PR.
  • b

    bright-gpu-74537

    02/19/2020, 10:05 AM
    unless you think otherwise ofc
  • b

    bright-gpu-74537

    02/19/2020, 10:05 AM
    cool... sounds good... much appreciated!
  • b

    bright-gpu-74537

    02/19/2020, 10:05 AM
    im surprised it wasnt there to be honest, i remember doing/reading something for tableview that was using listview as reference, i assumed it was selection
  • b

    bright-gpu-74537

    02/19/2020, 10:06 AM
    hang on... there is "selectedIndices" in tableview
  • n

    nutritious-boots-87264

    02/19/2020, 10:06 AM
    Half of the code including selection property is there, but it needs 3 more functions to do the event to behavior binding
  • b

    bright-gpu-74537

    02/19/2020, 10:06 AM
    and selectionMode
  • b

    bright-gpu-74537

    02/19/2020, 10:07 AM
    oh
  • b

    bright-gpu-74537

    02/19/2020, 10:07 AM
    so its there but isnt linked up??
  • n

    nutritious-boots-87264

    02/19/2020, 10:07 AM
    It's missing the function which checks current selection mode and currently pressed modifier keys
  • n

    nutritious-boots-87264

    02/19/2020, 10:07 AM
    Everything else is there, you'll see in the PR
  • b

    bright-gpu-74537

    02/19/2020, 10:08 AM
    right, fair enough... well good catch, and PR very much appreciated!
  • b

    bored-sandwich-20283

    02/19/2020, 8:55 PM
    newbie question here: is there a builder/editor/visual way to create haxeUI apps ?
  • u

    user

    02/20/2020, 2:40 AM
    Visual studio code and editing the xml. So pretty much nope.
  • b

    bright-gpu-74537

    02/20/2020, 9:16 AM
    actually, there is this:
  • b

    bright-gpu-74537

    02/20/2020, 9:16 AM
    but that is a really (really) old version so is pretty buggy
1...179180181...1687Latest