Closed DrDerico closed 8 years ago
Yeah, it doesnt seem to be used anywhere, you are right. One thing though i have noticed is you are using PopupButtonInfo and i cant see anywhere that is an input option in: https://github.com/ianharrigan/haxeui/blob/master/haxe/ui/toolkit/core/PopupManager.hx#L269
One thing to try is:
buttons:[{text: "AAA", fn: onDeleteTabConfirmedAAA}, {text: "BBB"}]
ie, use objects rather than PopupButtonInfo
As well as the method above can you pull latest from haxelib (1.8.21) and try that? Ive added a fix there that should invoke the .fn
when the button is clicked.
Ok, I'll try it tomorrow! Thank you very much!!!
It works! But if you use objects, you should write code in this way:
buttons:[{text: "AAA", fn: onDeleteTabConfirmedAAA}, {text: "BBB", fn: null}]
So all objects must contain the same fields, otherwise compiler gives an error message
Right, gotcha... Good to know! Thanks.
Hi!
When I add custom buttons to the config for building Popup, their callbacks don't invoke. For example:
showPopup("CONTENT", null, { useDefaultTitle:false, buttons:[new PopupButtonInfo(PopupButton.CUSTOM, "AAA", onDeleteTabConfirmedAAA), new PopupButtonInfo(PopupButton.CUSTOM, "BBB")] }, onDeleteTabConfirmed);
So, onDeleteTabConfirmedAAA doesn't invoke. I didn't see in haxeui source code any line, that makes deal with PopupButtonInfo "_fn" variable.