icy-zebra-52882
03/25/2021, 10:47 PM@:bind method either so that does the job of teaching wellicy-zebra-52882
03/25/2021, 10:48 PMotherButton.onClick = function(e) { ... }; method too?icy-zebra-52882
03/25/2021, 10:48 PM'@:bindicy-zebra-52882
03/25/2021, 10:48 PMbright-gpu-74537
03/25/2021, 10:49 PMbright-gpu-74537
03/25/2021, 10:49 PMbright-gpu-74537
03/25/2021, 10:52 PMxml
<vbox style="padding: 5px;">
<style>
.button {
font-size: 24px;
}
</style>
<hbox>
<button text="Click Me!" id="button1" style="color: red;" />
<button text="Click Me!" id="button2" style="color: green;" />
<button text="Click Me!" onclick="this.text='Thanks!'" style="color: blue;" />
</hbox>
</vbox>bright-gpu-74537
03/25/2021, 10:52 PMhaxe
package ;
import haxe.ui.containers.VBox;
import haxe.ui.events.MouseEvent;
@:build(haxe.ui.macros.ComponentMacros.build("assets/main-view.xml"))
class MainView extends VBox {
public function new() {
super();
button1.onClick = function(e) {
button1.text = "Thanks!";
}
}
@:bind(button2, MouseEvent.CLICK)
private function onMyButton(e:MouseEvent) {
button2.text = "Thanks!";
}
}bright-gpu-74537
03/25/2021, 10:52 PMicy-zebra-52882
03/25/2021, 10:53 PMbright-gpu-74537
03/25/2021, 10:53 PMbright-gpu-74537
03/25/2021, 10:53 PMicy-zebra-52882
03/25/2021, 10:54 PMbright-gpu-74537
03/25/2021, 10:55 PMbright-gpu-74537
03/25/2021, 10:55 PMicy-zebra-52882
03/25/2021, 10:55 PMbright-gpu-74537
03/25/2021, 10:56 PMbright-gpu-74537
03/25/2021, 10:56 PMicy-zebra-52882
03/25/2021, 10:57 PMicy-zebra-52882
03/25/2021, 10:57 PMbright-gpu-74537
03/25/2021, 10:57 PMbright-gpu-74537
03/25/2021, 10:57 PMicy-zebra-52882
03/25/2021, 10:58 PMcurved-appointment-82072
03/26/2021, 9:03 AMjs
Uncaught TypeError: this._initialValues is null
cacheInitalValue http://localhost:2000/TM_20210326_095134.js:23787
processGroupChild http://localhost:2000/TM_20210326_095134.js:23767
childAdd http://localhost:2000/TM_20210326_095134.js:23746
addComponent http://localhost:2000/TM_20210326_095134.js:23737
addComponent http://localhost:2000/TM_20210326_095134.js:7431
Main http://localhost:2000/TM_20210326_095134.js:957
onload http://localhost:2000/TM_20210326_095134.js:5024
TM_20210326_095134.js:23787:5
cacheInitalValue http://localhost:2000/TM_20210326_095134.js:23787
processGroupChild http://localhost:2000/TM_20210326_095134.js:23767
childAdd http://localhost:2000/TM_20210326_095134.js:23746
addComponent http://localhost:2000/TM_20210326_095134.js:23737
addComponent http://localhost:2000/TM_20210326_095134.js:7431
Main http://localhost:2000/TM_20210326_095134.js:957
onload http://localhost:2000/TM_20210326_095134.js:5024
I cannot reproduce it with a minimal example yet. I will try to narro down late r today
initializing _initivalues did pass the exception indeed (I don't know the side effect - testing HNTML5 target- so I am not doing a PR ...)
hx
//Group.hx > private function cacheInitalValue(c:Component)
//...
if (optionbox.selected == true)
{
if (_initialValues == null){
_initialValues = new Map<Component, Variant>();
}
_initialResets.remove(optionbox.componentGroup);
_initialValues.set(c, c.value);
}bright-gpu-74537
03/26/2021, 9:06 AMbright-gpu-74537
03/26/2021, 9:06 AMcurved-appointment-82072
03/26/2021, 9:06 AMxml
<vbox styleName="topic" id="transaction" width="100%" height="100%">
<label text="test" height="10%"></label>
<group id="A" height="5%" layout="horizontal">
<optionbox id="ya" text="ya" ></optionbox>
<optionbox id="na" text="na" ></optionbox>
</group>
<group id="B" height="5%" layout="horizontal">
<optionbox id="yb" text="yb" ></optionbox>
<optionbox id="nb" text="nb" ></optionbox>
</group>
</vbox>curved-appointment-82072
03/26/2021, 9:07 AMbright-gpu-74537
03/26/2021, 9:07 AMbright-gpu-74537
03/26/2021, 9:08 AM