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

    hallowed-ocean-84954

    12/18/2022, 4:36 AM
    So I was trying to add support for the selection of the config to update the reference lib selection. So I put a group around my optionboxes for the configuration:
    Copy code
    <group id="configurationGrpId" layoutName="vertical">
                                    <optionbox id="rubiksConfig"
                                        text="Rubik's Cube" selected="true" onChange="rubiksConfigFn()" />
                                    <optionbox id="simplePhongConfig"
                                        text="Simple Phong Lighting" onChange="phongConfigFn()" />
                                    <optionbox id="phongConfig"
                                        text="Phong Lighting and Materials"
                                        onChange="phongMaterialsConfigFn()" />
                                    <optionbox id="lightMapsConfig"
                                        text="Lighting Maps" onChange="lightMapsConfigFn()" />
                                    <optionbox id="lightCastersConfig"
                                        text="Light Casters" onChange="lightCastersConfigFn()" />
                                </group>
    And now it doesn't build throwing this:
    Copy code
    Uncaught exception: Can't cast bool to enum<haxe.ui.util.VariantType>
    Called from haxe.ui.containers._Group.Builder.cacheInitalValue(haxe/ui/containers/Group.hx:102)
    Called from haxe.ui.containers._Group.Builder.processGroupChild(haxe/ui/containers/Group.hx:82)
    Called from haxe.ui.containers._Group.Builder.childAdd(haxe/ui/containers/Group.hx:62)
    Called from haxe.ui.containers._Group.Builder.addComponent(haxe/ui/containers/Group.hx:49)
    Called from haxe.ui.core.Component.addComponent(haxe/ui/core/Component.hx:381)
    Called from ui.$UI.__constructor__(ui/UI.hx:173)
    ...
    UI.hx is my UI class.
  • h

    hallowed-ocean-84954

    12/18/2022, 4:36 AM
    I checked the Group.hx and it's trying to assign the optionbox value to a Variant which apparently is impossible because it's type is bool.
  • h

    hallowed-ocean-84954

    12/18/2022, 4:40 AM
    This works on the playground so perhaps an openfl thing or HL ?
  • h

    hallowed-ocean-84954

    12/18/2022, 4:43 AM
    Might be HL - just ran my code on HTML5 and it works there.
  • p

    powerful-morning-89

    12/18/2022, 6:55 AM
    It's a HL thing. It's much stricter about casting than JS or even hxcpp.
  • b

    bright-gpu-74537

    12/18/2022, 8:37 AM
    right, nice one, ill take a look, i wonder why that specific assignment is an issue, would have expected otherones too - maybe there are
  • b

    bright-gpu-74537

    12/18/2022, 8:38 AM
    im not sure im following, are you saying your dropdown uses a custom handler, and that api is a bit crappy?
  • b

    bright-gpu-74537

    12/18/2022, 8:51 AM
    Error: Source path "C:/SDK/forks/lime/ndll/Windows64/lime.hdll" does not exist
  • b

    bright-gpu-74537

    12/18/2022, 8:52 AM
    i guess i need to build the hdll... will it just be
    lime rebuild hl
    or something - ill try it
  • b

    bright-gpu-74537

    12/18/2022, 8:54 AM
    yeah, that worked
  • b

    bright-gpu-74537

    12/18/2022, 9:12 AM
    alright, should be fixed now:
  • b

    bright-gpu-74537

    12/18/2022, 10:22 AM
    i also think the tooltip thing is fixed:
  • b

    bright-gpu-74537

    12/18/2022, 10:26 AM
    http://haxeui.org/builder/?89b144f4
  • h

    hallowed-ocean-84954

    12/18/2022, 3:01 PM
    I was only wondering if this method was the supported way of doing things. I generally don't like using @:accept to get at non-public APIs. And secondly I want to know if the fact that you had to register the handler before interacting with the UI at all was correct. It seems necessary and makes sense but there was no doc on it I could find.
  • h

    hallowed-ocean-84954

    12/18/2022, 3:04 PM
    Many thanx for jumping on this - I did find a w/a but this is neater and simpler.
  • h

    hallowed-ocean-84954

    12/18/2022, 3:15 PM
    Thanx also for this. One thing I notice is, the tooltip for the section only shows once the section is open and then when you mouse of the open areas in that section. It doesn't pop up when you mouseover just the section heading.
  • r

    refined-greece-48002

    12/18/2022, 5:20 PM
    Any idea why, when debugging haxe-ui for Heaps on hl target, I get a half-rendered system box when calling show() on openfiledialog or closefiledialog the first time? (Debugging in VSCode, on windows 11) Looks like (see attached), and both the main window and the file dialog remain frozen until I pause/unpause the debugger once. It is waiting at haxe/std/hl/UI.hx line 209
    var str = _chooseFile(save, out);
    Once I've paused/unpaused the debugger once, the file dialog renders properly and works as expected, and all subsequent file dialogs work fine until I restart the debugger, at which point the behavior occurs again. This doesn't occur when running outside the debugger, eg by calling
    hl myproject.hl
    from the command line.
  • r

    refined-greece-48002

    12/18/2022, 5:25 PM
    (haxe 4.2.5, git-latest heaps/haxeui/haxeuiheaps)
  • b

    bright-gpu-74537

    12/18/2022, 6:06 PM
    I mean, its defo a "supported way" of doing things - i do think the API is a little clumsy, as you have noticed, it feels "internal" but thats just because, well, i think im the only person who has ever used it - i could be wrong but i dont know of another project that has used the dropdown handler api, so im sure there are improvements that could (should) be made... ill give it the once over at some point, but feedback, ofc, more than welcome
  • b

    bright-gpu-74537

    12/18/2022, 6:07 PM
    it might be eating the mouse over or something, do you have a repro?
  • b

    bright-gpu-74537

    12/18/2022, 6:07 PM
    without "fobbing you off" it does sound like this might be an hl / UI.hx / vscode issue - does it all work fine if you call the function in a non haxeui app?
  • h

    hallowed-ocean-84954

    12/18/2022, 6:49 PM
    your own example repros this behaviour
  • h

    hallowed-ocean-84954

    12/18/2022, 6:51 PM
    I haven't looked at exactly how it works but I assume it's just where the triggering event is attached. I sort of figured that having the popup over the unexpanded title would be useful so people could see which part of the accordion did what - it's seriously just a nice to have but that was how I was thinking originally. I can see the use of having it in the open accordion where it is but then you can already see the content, so the closed case seemed more helpful
  • h

    hallowed-ocean-84954

    12/18/2022, 7:10 PM
    This is the first one I've done but I like it because it allow you to refer to help material and then hide it away so you can see the main screen. The API is a little involved for sure. I was sort of surprised I needed a
    *Dropdown
    and a
    *DropdownHandlerView
    class plus the
    *DropdownHandler
    class itself. Oh ooops - I have one extra unused class. My
    *DropdownHandlerView
    class plus the
    *DropdownHandler
    are actually the same 🙂 Ooops. Ok that makes it a bit simpler. So you need a handler and a view class - that makes more sense.
  • b

    bright-gpu-74537

    12/18/2022, 7:11 PM
    oh, i see, thats specific to accordion, it creates a button off of the view (page), but obviously doesnt copy over the tooltip
  • b

    bright-gpu-74537

    12/18/2022, 7:12 PM
    from what i can see from the screen shots your usage looks pretty spot on, so yeah, if the api can be streamlined it probably should be
  • h

    hallowed-ocean-84954

    12/18/2022, 7:13 PM
    so the only remaining "gotcha in the API besides the @:access is the need to register the handler just after calling super() in the UI class
  • h

    hallowed-ocean-84954

    12/18/2022, 7:13 PM
    but it's a really nice feature
  • b

    bright-gpu-74537

    12/18/2022, 7:15 PM
    is your code published anywhere btw? Just so i can read it... i think the popup stuff can defo be improved, ive been meaning to for a while, but id be interested in how you have used it
  • h

    hallowed-ocean-84954

    12/18/2022, 7:15 PM
    I am about to push the code to gh now - will ping you when it's there
1...134013411342...1687Latest