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

    bright-gpu-74537

    08/18/2022, 7:53 AM
    TreeView is still considered "experimental" so, undoubtedly there will be issues there, though im certainly more than happy to hear (and fix) any perf issues that come up
  • b

    bright-gpu-74537

    08/18/2022, 7:54 AM
    i use it quite extensively, and there are issues ive noticed: for example, i use it to display json results from webservices, one of the json responses had like 1000+ json attributes (so 1000+ treeview nodes), although that populated, it certainly wasnt quick
  • n

    nutritious-australia-67366

    08/18/2022, 7:55 AM
    What about performance of TreeView? I was trying yesterday(native windows target) to fill in data which Several Thousands of items which seemed to be a little slow. It could be my code though.
  • f

    full-journalist-82607

    08/18/2022, 7:55 AM
    @bright-gpu-74537 Ok cool, once it's big enough, I'll sent it to you 🙂 ( if I don't change the organisation once again haha)
  • b

    bright-gpu-74537

    08/18/2022, 7:56 AM
    i doubt its your code (see above), maybe there are enhancements that can (and should) be made there... 1000+ items is alot though, and treeview doesnt have any form of virtualisation (like listview and tableview do)
  • b

    bright-gpu-74537

    08/18/2022, 7:57 AM
    a test app would be useful, i mean, im sure i could knock one up, but it'll save me time, and generally, is more useful to get someone elses use case (rather than me having to guess usage)
  • n

    nutritious-australia-67366

    08/18/2022, 8:02 AM
    Makes sense, I will see if I and can wrap something up that illustrates the problem - biggest thing is that I need to untangle my company's proprietary code first.
  • p

    purple-businessperson-14467

    08/18/2022, 4:17 PM
    Its a little weird on "wrap catching"
  • p

    purple-businessperson-14467

    08/18/2022, 4:17 PM
    https://www.haxeui.org/builder/?tjzptg
  • p

    purple-businessperson-14467

    08/18/2022, 4:42 PM
    Maybe this is more helpfull.
  • p

    purple-businessperson-14467

    08/18/2022, 4:42 PM
    The latter half I delete 1 "i"
  • p

    purple-businessperson-14467

    08/18/2022, 5:13 PM
    By the way, after testing in builder and seeing the issue, I started working on my app and it doesnt have the same issue anymore. So it appears to be issue on builder only?
  • p

    purple-businessperson-14467

    08/18/2022, 5:15 PM
    Thank you Mr Ian sir
  • p

    purple-businessperson-14467

    08/18/2022, 5:45 PM
    Any easy way to make column sort by Int instead of String? Sort first column and values are 1,10,11.. instead of 1,2,3... http://haxeui.org/builder/?otxlqm
  • b

    bright-gpu-74537

    08/18/2022, 5:56 PM
    ah, yeah, this is shitty, i actually removed code ages ago that i thought wasnt needed but it seems it was
  • b

    bright-gpu-74537

    08/18/2022, 5:57 PM
    that said, this does highlight the fact that you cant easily override with your own sort... ... or can you?
  • b

    bright-gpu-74537

    08/18/2022, 5:58 PM
    yeah, you could listen to the header column clicks and apply your own sort to the datasource... ... that said, it would probably be nicer for the tableview to emit some event when it think sorting needs to occur
  • p

    purple-businessperson-14467

    08/18/2022, 6:00 PM
    to do the header click I would have to 1. Turn sort off. 2. Apply sorting icons to header based on custom sort. 3. Apply custom sort?
  • p

    purple-businessperson-14467

    08/18/2022, 6:00 PM
    assuming I wanted the icons I mean
  • b

    bright-gpu-74537

    08/18/2022, 6:01 PM
    oh, there is already sort event... however, its not really emitted by the tableview, i think ill fix that
  • b

    bright-gpu-74537

    08/18/2022, 6:07 PM
    right, ok, so in git core, you can no do something like:
  • b

    bright-gpu-74537

    08/18/2022, 6:08 PM
    Copy code
    haxe
            myTable.onSortChanged = function(e) {
                e.cancel(); // stop default sort from happening
                myTable.dataSource.sortCustom(...);
            };
  • p

    purple-businessperson-14467

    08/18/2022, 6:08 PM
    gotcha, cool, will test
  • b

    bright-gpu-74537

    08/18/2022, 6:09 PM
    and if you want to know what column etc, you can use:
  • b

    bright-gpu-74537

    08/18/2022, 6:09 PM
    Copy code
    haxe
                var column = cast(e.target, Column);
                var field = column.id;
  • b

    bright-gpu-74537

    08/18/2022, 6:10 PM
    i still think the default sort should be fixed, but it does highlight a need, potentially, for custom sorting, which wasnt really an option with out that sort event being emitted (since there are mulitple columns etc)
  • p

    purple-businessperson-14467

    08/18/2022, 6:11 PM
    agreed. I'll add the custom and if default ever chagnes...well, maybe I'll do nothing because custom mworks...but I'll test it either way
  • b

    bright-gpu-74537

    08/18/2022, 6:11 PM
    heres the (default) sort from tableview for ref:
    Copy code
    haxe
                var column = cast(e.target, Column);
                var field = column.id;
                if (column.sortField != null) {
                    field = column.sortField;
                }
                _tableview.dataSource.sort(field, e.direction);
  • p

    purple-businessperson-14467

    08/18/2022, 6:12 PM
    So I do nothing but paste? I should just quit my job and pipe all work to you
  • p

    purple-businessperson-14467

    08/18/2022, 6:12 PM
    oh, wait, copy/paste
1...121412151216...1687Latest