hallowed-ocean-84954
12/24/2022, 5:28 PMbright-gpu-74537
12/24/2022, 5:28 PMhallowed-ocean-84954
12/24/2022, 5:28 PMhallowed-ocean-84954
12/24/2022, 5:29 PMbright-gpu-74537
12/24/2022, 5:29 PMbright-gpu-74537
12/24/2022, 5:30 PM@:bind(somethingThatDoesntExist)
you get a compilation failure, which is sensible, where as before it was just.... ... ... "fine"...hallowed-ocean-84954
12/24/2022, 5:30 PMhallowed-ocean-84954
12/24/2022, 5:30 PMbright-gpu-74537
12/24/2022, 5:33 PMhallowed-ocean-84954
12/24/2022, 5:35 PMbright-gpu-74537
12/24/2022, 5:35 PMfull-journalist-82607
12/24/2022, 5:39 PMhallowed-ocean-84954
12/24/2022, 6:11 PMbright-gpu-74537
12/24/2022, 6:33 PMbright-gpu-74537
12/24/2022, 6:34 PMfull-journalist-82607
12/26/2022, 9:41 AMxml
<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 anymorebright-gpu-74537
12/26/2022, 4:43 PMfull-journalist-82607
12/26/2022, 4:51 PMbright-gpu-74537
12/26/2022, 4:55 PMdisableInteractiveEvents
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 🙂full-journalist-82607
12/26/2022, 5:01 PMbright-gpu-74537
12/26/2022, 5:01 PMfull-journalist-82607
12/26/2022, 5:05 PMhaxe
@: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)full-journalist-82607
12/26/2022, 5:06 PMfull-journalist-82607
12/26/2022, 5:07 PMbright-gpu-74537
12/26/2022, 5:07 PMaddClass("correct", true, true)
full-journalist-82607
12/26/2022, 5:08 PMbright-gpu-74537
12/26/2022, 5:08 PMbright-gpu-74537
12/26/2022, 5:09 PMfull-journalist-82607
12/26/2022, 5:12 PM