Not sure if this is a bug or working as designed. Here is very simple demo.
The debug output after opening the dialog then navigating away and back again without clicking any control is:
0 : msg_obj.event = click : msg_obj.control = radio1
Code and resources as shown below and the button is attached as a DCF.
DlgTest.dcf (7.9 KB)
function OnClick(clickData)
{
var src = clickData.func.sourcetab;
var dlg = clickData.func.dlg;
dlg.window = src;
dlg.template = "dialog1";
dlg.detach = true;
dlg.title = "dialog1";
//dlg.create;
dlg.show;
var iteration = 0;
var msg_obj;
var str;
do{
msg_obj = dlg.getmsg(); if (msg_obj==false) break;
str = iteration++;
str+= " : msg_obj.event = " + msg_obj.event;
str+= " : msg_obj.control = " + msg_obj.control;
DOpus.output(str);
}
while (msg_obj);
}
Resources are defined as:
<resources>
<resource name="dialog1" type="dialog">
<dialog fontsize="8" height="87" lang="" width="135">
<control height="57" name="group1" title="Group" type="group" width="77" x="14" y="6" />
<control height="10" name="radio1" title="Radio Button" type="radio" width="64" x="19" y="22" />
<control height="10" name="radio2" title="Radio Button" type="radio" width="64" x="19" y="34" />
<control height="10" name="radio3" title="Radio Button" type="radio" width="64" x="19" y="46" />
</dialog>
</resource>
</resources>