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

    clever-yak-82528

    08/29/2022, 6:26 AM
    so i have to manually specify the ids?
  • b

    bright-gpu-74537

    08/29/2022, 6:26 AM
    no, it just means what field from its data it will use to build the string path
  • c

    clever-yak-82528

    08/29/2022, 6:27 AM
    or is there an auto incremented index counter?
  • b

    bright-gpu-74537

    08/29/2022, 6:27 AM
    ie, "My Root Text/My Node Text/My Other Node" (thats what it would look like if it were using "text" for example - and assuming those were the "text"'s)
  • c

    clever-yak-82528

    08/29/2022, 6:31 AM
    so is there any way to get the index of the node?
  • b

    bright-gpu-74537

    08/29/2022, 6:31 AM
    index relative to its parent node?
  • c

    clever-yak-82528

    08/29/2022, 6:32 AM
    yeah
  • b

    bright-gpu-74537

    08/29/2022, 6:32 AM
    sure, its just a child... so you should just be able to do
    myParentNode.getComponentIndex(myNode)
  • b

    bright-gpu-74537

    08/29/2022, 6:32 AM
    but obviously myNode would have to be a direct child (node) of the parent
  • b

    bright-gpu-74537

    08/29/2022, 6:33 AM
    how does node index help in anything anyway? (out of curiosity)
  • c

    clever-yak-82528

    08/29/2022, 6:34 AM
    because i want to display the correct page in the stack on the right based on the index
  • c

    clever-yak-82528

    08/29/2022, 6:34 AM
    though hm
  • c

    clever-yak-82528

    08/29/2022, 6:34 AM
    thinking about it, it might be more sensible to do that based on the path
  • b

    bright-gpu-74537

    08/29/2022, 6:34 AM
    right, sounds like more effort than is needed, you might want to just add bit of data to the node when you populate it like "viewToShow" or whatever
  • c

    clever-yak-82528

    08/29/2022, 6:35 AM
    mhm
  • b

    bright-gpu-74537

    08/29/2022, 6:35 AM
    if you check out the .hx file on this example: http://haxeui.org/explorer/#containers/tree_views
  • b

    bright-gpu-74537

    08/29/2022, 6:36 AM
    you can put anything you want in the node
  • c

    clever-yak-82528

    08/29/2022, 6:36 AM
    yeah
  • c

    clever-yak-82528

    08/29/2022, 6:36 AM
    i have an idea for this
  • b

    bright-gpu-74537

    08/29/2022, 6:36 AM
    so you could just do something like
    switch (mytree.selectedNode.viewToShow) { ... }
  • c

    clever-yak-82528

    08/29/2022, 6:37 AM
    i think i have a nice way of doing it
  • b

    bright-gpu-74537

    08/29/2022, 6:37 AM
    cool - in a moment im going it push a fix for hxWidgets, would you mind testing it out and seeing if it fixes that compile error?
  • c

    clever-yak-82528

    08/29/2022, 6:37 AM
    alright
  • b

    bright-gpu-74537

    08/29/2022, 6:37 AM
    👌 - thanks, bear with me
  • c

    clever-yak-82528

    08/29/2022, 6:37 AM
    though, my code uses treeview, so...
  • b

    bright-gpu-74537

    08/29/2022, 6:38 AM
    well, just a project that doesnt? If not, its fine, i can spin up my other machine, i just though you might be "good to go"
  • c

    clever-yak-82528

    08/29/2022, 6:38 AM
    hold on
  • b

    bright-gpu-74537

    08/29/2022, 6:39 AM
    nvm, ill spin up the other machine... probably makes more sense to do it there anyway
  • c

    clever-yak-82528

    08/29/2022, 6:39 AM
    nono i have another project
  • b

    bright-gpu-74537

    08/29/2022, 6:47 AM
    ok, if you pull latest hxWidgets can you compile again?
1...122812291230...1687Latest