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

    bright-gpu-74537

    08/18/2022, 6:12 PM
    well, you'll need to implement your custom sort by using
    _tableview.dataSource.sortCustom
    rather than
    _tableview.dataSource.sort
    otherwise you are just gonna have the same issue
  • p

    purple-businessperson-14467

    08/18/2022, 6:12 PM
    right-o thank you
  • b

    bright-gpu-74537

    08/18/2022, 6:21 PM
    btw, not sure if was you or other people asking, but you can now register custom components from root, eg:
  • b

    bright-gpu-74537

    08/18/2022, 6:21 PM
    Copy code
    xml
    <module>
        <components>
            <class package="." />
        </components>
    </module>
  • b

    bright-gpu-74537

    08/18/2022, 6:21 PM
    i know its been annoying me for a while 🙂
  • f

    full-branch-26766

    08/18/2022, 6:45 PM
    hey! I'm trying to understand why my component won't show up in heaps
    Copy code
    haxe
            var mainView:Component = ComponentMacros.buildComponent("assets/main-view.xml");
            Screen.instance.addComponent(mainView);
  • f

    full-branch-26766

    08/18/2022, 6:46 PM
    its probably something simple im missing but cant find it
  • b

    bright-gpu-74537

    08/18/2022, 7:02 PM
    looks fine, you'll need to show more of your app, how are you initializing the toolkit etc?
  • f

    full-branch-26766

    08/18/2022, 7:03 PM
    Copy code
    haxe
    import h3d.Vector;
    import haxe.ui.Toolkit;
    import h2d.Scene;
    import haxe.ui.*;
    import haxe.ui.macros.ComponentMacros;
    import haxe.ui.core.Component;
    import haxe.ui.core.Screen;
    
    class Main extends hxd.App {
        override function init() {
            Toolkit.init();
            this.engine.backgroundColor = 0xFFFFFF;
            var tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
            tf.text = "Hello Hashlink !";
            tf.textColor = 0x000000;
            
            var mainView:Component = ComponentMacros.buildComponent("assets/main-view.xml");
            Screen.instance.addComponent(mainView);
        }
        static function main() {
            new Main();
        }
    }
  • f

    full-branch-26766

    08/18/2022, 7:03 PM
    that the full app
  • b

    bright-gpu-74537

    08/18/2022, 7:05 PM
    so i think for heaps you need to specify what is the "root" (which is where Screen will put components, also where things like Dialogs will go)... something like:
    Copy code
    haxe
    Toolkit.init({root: s2d});
  • f

    full-branch-26766

    08/18/2022, 7:06 PM
    omg it worked 🙏
  • b

    bright-gpu-74537

    08/18/2022, 7:06 PM
    note you dont have to use use root, its mainly for screen, you should just be able to s2d.addChild(mainView)... using root is nicer though if you are using various parts of screen (dialogs, dropdown, etc, etc)
  • f

    full-branch-26766

    08/18/2022, 8:00 PM
    is it just me or does
    Copy code
    haxe
    <tabview id="tv1" width="100%" height="100%" styleName="full-width-buttons">
    not work in heaps? when i paste my xml into the playground on the website it behaves correctly but not on heaps
  • f

    full-branch-26766

    08/18/2022, 8:01 PM
    the styleName part doest work
  • f

    full-branch-26766

    08/18/2022, 8:07 PM
    if anyone wants to try it here's my full xml
    Copy code
    <vbox  width="100%" height="100%">
        <style>
            .button {
                font-size: 24px;
            }
        </style>
        <splitter width="100%" height="100%">
                
                <hbox width="30%" height="100%">
                    <tabview id="tv1" width="100%" height="100%" styleName="full-width-buttons">
                        <box text="setting" >
                            <button text="Page 1" />
                        </box>
                        <box text="attributes" >
                            <button text="Page 2" />
                        </box>
                        <box text="export">
                            <button text="Page 3" />
                        </box>
                    </tabview>
                </hbox>
                <absolute id="graphContainter" width="100%" height="100%"/>
        </splitter>   
    </vbox>
  • a

    ambitious-knife-25690

    08/18/2022, 8:29 PM
    make sure you're running git versions of every thing
  • b

    bright-gpu-74537

    08/18/2022, 8:46 PM
    So yeah, make sure you are using git versions, if that doesnt fix it it may well be a bug in haxeui(-heaps)... what happens if you give the top level vbox a fixed size? What if you remove the splitter, etc
  • f

    full-branch-26766

    08/18/2022, 9:10 PM
    I dont have the git version that might be it
  • b

    bright-gpu-74537

    08/18/2022, 9:20 PM
    i think
    full-width-buttons
    variant was added pretty recently, well, certainly after the haxelib release, which is about 6 months old now... i keep saying it every weekend, but i WILL release 1.5 to haxelib this weekend (its the write up i cant be arsed with 😄 )
  • f

    full-branch-26766

    08/18/2022, 9:25 PM
    I'm new to haxe so i wasnt aware of that xD
  • b

    bright-gpu-74537

    08/18/2022, 9:28 PM
    its more of a "me" thing than a "haxe" thing (ie, im very slow to release)
  • f

    full-branch-26766

    08/18/2022, 9:28 PM
    i had the same issue with heaps having to install the git version
  • b

    bright-gpu-74537

    08/18/2022, 9:29 PM
    yeah, i kinda get the feeling most people use git versions of libs generally... no excuse to not release though, as it just adds problems (like with yourself: obvious thing to do is "haxelib install haxeui-core"... oh, nothing works, or doesnt work as it should)
  • f

    full-branch-26766

    08/18/2022, 9:44 PM
    aah yes now it wont build
  • b

    bright-gpu-74537

    08/18/2022, 9:45 PM
    you need git haxeui-core and git haxeui-heaps (and git heaps)
  • f

    full-branch-26766

    08/18/2022, 9:46 PM
    yea thats what I did but it wont build
  • b

    bright-gpu-74537

    08/18/2022, 9:46 PM
    whats the error?
  • f

    full-branch-26766

    08/18/2022, 9:46 PM
    Copy code
    C:\HaxeToolkit\haxe\lib\haxeui-heaps/git/haxe/ui/backend/TextInputImpl.hx:16: characters 19-28 : h2d.TextInput has no field lineBreak
  • b

    bright-gpu-74537

    08/18/2022, 9:47 PM
    hmmm, i guess something has changed in heaps since i last updated
1...121512161217...1687Latest