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

    icy-zebra-52882

    09/12/2022, 8:57 PM
    you can also see that behaviour in the component demo page: http://haxeui.org/explorer/#containers/table_views look at tableview 5, and sort by rating, the one with 100 rating gets shown as being the lowest when everything else is sorted ascending order, and vice versa
  • p

    purple-businessperson-14467

    09/12/2022, 9:14 PM
    I used something like
    Copy code
    table.onSortChanged = function(e) {
        // stop default sort from happening
        var column = cast(e.target, Column);
        var field = column.id;
        if (field == "idfield") {
            e.cancel();
            table.dataSource.sortCustom((a, b) -> {
              (e.direction == SortDirection.ASCENDING)?a.int - b.int : b.int - a.int;
            });
        }                
    };
  • i

    icy-zebra-52882

    09/12/2022, 9:20 PM
    ah that's what I was looking for, thought it would be in
    dataSource
    , thanks!
  • r

    refined-laptop-39041

    09/13/2022, 1:56 AM
    @bright-gpu-74537 Do you want me to try to try to link it up with HaxeUI-Kha or would that be kinda tricky?
  • b

    bright-gpu-74537

    09/13/2022, 5:46 AM
    its up to you, ill get round to it, just wont be for a while since i have other "work work" i need to be getting on with
  • b

    bright-gpu-74537

    09/13/2022, 5:47 AM
    So i originally had code, iirc, to specifically handle for these types of things. But i removed it in favour of the haxe default sort algo... i think i might add my old one back in and see if fares better in these cases - maybe my memory is totally off and it yields the same result
  • b

    bright-gpu-74537

    09/13/2022, 6:50 AM
    my other main concern is how well it will play with kha scissors (clip rects)... hopefully just fine, but defo needs to be tested
  • b

    bright-gpu-74537

    09/13/2022, 3:26 PM
    oooo... i found a need for a combo box... ie, a dropdown with a list of options, but also one i can use free text in... ... might have to write one now...
  • b

    bright-gpu-74537

    09/13/2022, 3:27 PM
    im actually thinking about making all item editors have the possibility of being "editable", which would mean "for free" things like treeview, tableviews and listviews could also editable... ... 🤔
  • b

    best-agent-85158

    09/13/2022, 3:32 PM
    Seems like a cool thing to add, especially if it's easy to implement
  • b

    bright-gpu-74537

    09/13/2022, 3:33 PM
    i dont think its particularly easy, but i think its probably worth it, i mean, you'll also certainly want editable "things" in trees and tables at some point, and it would probably be real nice to just have a
    <item-renderer editable=true >...
    rather than roll out your own system each time (as ive been doing)
  • b

    best-agent-85158

    09/13/2022, 3:35 PM
    Also pretty useful (i can see myself ysing an editable treeview for a vector drawing app)
  • b

    best-agent-85158

    09/13/2022, 3:40 PM
    Ok if u find yourself implementing it more than twice you're better off integrating into haxeui
  • b

    best-agent-85158

    09/13/2022, 3:41 PM
    I mean, hazeui is still your project, and you have every right to improve it as you wish
  • b

    bright-gpu-74537

    09/13/2022, 3:41 PM
    true enough... the trick is making sure its a "good" and generic impl... when its embedded in a project its easier to make assumptions
  • b

    best-agent-85158

    09/13/2022, 3:41 PM
    > "hazeui" - my phones autocomplete
  • b

    bright-gpu-74537

    09/13/2022, 3:42 PM
    yeah, new name ☑️
  • e

    elegant-twilight-61392

    09/16/2022, 4:31 AM
    the scroll wheel doesnt work in the code views on the component explorer
  • e

    elegant-twilight-61392

    09/16/2022, 4:31 AM
    in these
  • b

    bright-gpu-74537

    09/16/2022, 5:19 AM
    you mean in monaco (the code editor)
  • h

    happy-agent-4114

    09/16/2022, 3:42 PM
    Does tabPosition not work on hxwidgets?
  • h

    happy-agent-4114

    09/16/2022, 3:43 PM
    I copy pasted something that works in the playground and it doesn't work in my app so either that or I extra broke something
  • b

    bright-gpu-74537

    09/16/2022, 3:53 PM
    nope, dont think its mapped
  • b

    bright-gpu-74537

    09/16/2022, 3:53 PM
    not even sure if its "its a thing" on wx tabs is it?
  • b

    bright-gpu-74537

    09/16/2022, 3:54 PM
    heh heh, first thing on the page 😄
  • b

    bright-gpu-74537

    09/16/2022, 3:55 PM
    ill take a look doesnt seem hard to implement if its just a style
  • h

    happy-agent-4114

    09/16/2022, 4:08 PM
    Nice
  • h

    happy-agent-4114

    09/16/2022, 4:08 PM
    Also is there documentation on the styles that each element supports
  • b

    bright-gpu-74537

    09/16/2022, 4:08 PM
    you mean in wx or haxeui
  • b

    bright-gpu-74537

    09/16/2022, 4:09 PM
    if you mean haxeui you are going to be very limited (on native) and even then it varies from platform to platform
1...126012611262...1687Latest