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

    hallowed-ocean-84954

    12/24/2022, 5:28 PM
    I didn't understand the old code tbh
  • b

    bright-gpu-74537

    12/24/2022, 5:28 PM
    noice... 🥳
  • h

    hallowed-ocean-84954

    12/24/2022, 5:28 PM
    still have to get into macros
  • h

    hallowed-ocean-84954

    12/24/2022, 5:29 PM
    so thank you very much for this
  • b

    bright-gpu-74537

    12/24/2022, 5:29 PM
    well, it was doing the same as the new code... sorta, except a) it didnt need to use findComponent since we already have a member var and b) it was trying to handle not being able to find components in a weird way
  • b

    bright-gpu-74537

    12/24/2022, 5:30 PM
    also, now, if you do
    @:bind(somethingThatDoesntExist)
    you get a compilation failure, which is sensible, where as before it was just.... ... ... "fine"...
  • h

    hallowed-ocean-84954

    12/24/2022, 5:30 PM
    I think the findComp must have got confused because it was complaining about an object unrelated to the field it was processing - I never did figure out why
  • h

    hallowed-ocean-84954

    12/24/2022, 5:30 PM
    oh cool - yeah comp failure is better than runtime
  • b

    bright-gpu-74537

    12/24/2022, 5:33 PM
    well, it was worse than that, it would never fail, even at runtime, it just wouldnt find the component and return a null variant... so yeah, all in all, pretty dumb system... i can only assume that i wrote that part before adding the member vars (??) but that seems doubtful... so probably just good old fashioned not thinking properly
  • h

    hallowed-ocean-84954

    12/24/2022, 5:35 PM
    ah .... ok - well good to have that corrected then
  • b

    bright-gpu-74537

    12/24/2022, 5:35 PM
    yeah
  • f

    full-journalist-82607

    12/24/2022, 5:39 PM
    Oh nice, I wonder if you have just corrected this issue https://github.com/haxeui/haxeui-core/issues/481
  • h

    hallowed-ocean-84954

    12/24/2022, 6:11 PM
    ok - tested it in Haxe - it works but you cannot actually do an @:bind() on the composite - instead you have to do the getter thing which you did in your example and which I've used elsewhere. I am not sure I understand why - is the @:bind only for event based updates sort of things ? But regardless it does work now
  • b

    bright-gpu-74537

    12/24/2022, 6:33 PM
    can you explain with an example? (gonna sign off in a moment though, so no rush)
  • b

    bright-gpu-74537

    12/24/2022, 6:34 PM
    oh yeah, GH issues... 😄 I really need to go through them and see... seems ive found my new year resolution 😄
  • h

    hallowed-ocean-84954

    12/24/2022, 8:12 PM
    Yeah I think this is it . But the playground doesn't have the Variant fix perhaps ?
  • f

    full-journalist-82607

    12/26/2022, 9:41 AM
    I have a few others hxwidgets interesting bug, the most important one
    Copy code
    xml
    <vbox width="100%" height="100%">
    <button id="disable" text="disable myButton" onclick="button.disabled=true"/>
    <button id="undisable" text="undisable myButton" onclick="button.disabled=false"/>
    <button id="button" text="myButton" onclick="trace(Date.now())"/>
    </vbox>
    If you disable a button, then undisable it, the button events don't work anymore
  • b

    bright-gpu-74537

    12/26/2022, 4:43 PM
    alright, fixed, that was a "fun" one... stupidly simple, but took a little of head scratching to understand what was going on... one liner in the end... was just calling the wrong function in the native behaviour
  • f

    full-journalist-82607

    12/26/2022, 4:51 PM
    Nice ! I had looked this function, but didn't understand why it didn't work. Even now, I don't really what you just did
  • b

    bright-gpu-74537

    12/26/2022, 4:55 PM
    so... the
    disableInteractiveEvents
    literally just caches the events / listeners, and the calls unregisterEvent... ... however unregisterEvent has a check there to see if
    _interactivityDisabled
    is set, which is only set in
    disableInteractivity
    , not
    disableInteractiveEvents
    , essentially
    disableInteractivity
    should be calling
    disableInteractiveEvents
    not "me"... The other side effect of this would have been if you call "disable" 100 times and "enable" 101, then things would still be broken (which they arent now since the behaviour is calling
    disableInteractivity
    as it should be)... Thought i was going a little mad there for a while... but it all makes sense now 🙂
  • f

    full-journalist-82607

    12/26/2022, 5:01 PM
    Haha, I have to think it over, even with your explanation ... No wonder you were confused. BTW, are you still interested in some bugs for today, or do you prefer some kind of advent calendar ? 😉
  • b

    bright-gpu-74537

    12/26/2022, 5:01 PM
    well, paste away, cant promise ill get them done today / tomorrow... but if they are here they are at least on my radar
  • f

    full-journalist-82607

    12/26/2022, 5:05 PM
    Copy code
    haxe 
    @:xml('
    <vbox width="100%" height="100%">
    <style>
    
    .correct #buttontrue    {
        icon: $check-selected ;
    }
    
    #buttontrue.colour    {
        background-color: #555500;
    }
    #buttontrue.calo   {
        background-color: 0x555500;
    }
    </style>
    <button id="buttontrue" text="showDialog"/>
    </vbox>')
    class A005 extends VBox {
    
    
        public function new() {
            
            super();
           //addClass("correct");   Works here
        }
    
        @:bind(buttontrue, MouseEvent.CLICK)
        private function selectFromButton(e) {
            addClass("correct");  // Doesn't work, "correct" stylename doesn't show
            buttontrue.addClass("colour");  // "colour" stylename shows but "correct" doesn't
            //  buttontrue.addClass("calo");   This makes addClass("correct") work,  calo stylename is invalid
    }
    }
    ( you will also be able to see a tiny bug : adding the check after the creation doesn't place it well)
  • f

    full-journalist-82607

    12/26/2022, 5:06 PM
    And RIGHT_CLICK doesn't seem to work ( just noticed a few minutes ago)
  • f

    full-journalist-82607

    12/26/2022, 5:07 PM
    My comments are kind of bad, correcting them
  • b

    bright-gpu-74537

    12/26/2022, 5:07 PM
    i think you need to invalidate all sub components...
    addClass("correct", true, true)
  • f

    full-journalist-82607

    12/26/2022, 5:08 PM
    But it works on html5
  • b

    bright-gpu-74537

    12/26/2022, 5:08 PM
    oh, then its not that
  • b

    bright-gpu-74537

    12/26/2022, 5:09 PM
    ... ... ... ill check it out when i get a moment
  • f

    full-journalist-82607

    12/26/2022, 5:12 PM
    I don't really need it to be corrected, as I've used workarounds, just took some time to notice what was the problem. Obviously , RIGHT_CLICK doesn't really have a work around
1...135313541355...1687Latest