<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">The documentation for wxDialog:showModal/1 promises (indirectly, anyway) that<div><br></div><div>  "<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; ">The return value is the value set with <a href="http://docs.wxwidgets.org/stable/wx_wxdialog.html#wxdialogsetreturncode" target="_blank" style="color: rgb(204, 153, 0); ">wxDialog::SetReturnCode</a>."</span><br>
<div><br></div><div>See <a href="http://docs.wxwidgets.org/stable/wx_wxdialog.html#wxdialogshowmodal" target="_blank" style="color: rgb(0, 0, 204); ">http://docs.wxwidgets.org/stable/wx_wxdialog.html#wxdialogshowmodal</a></div>
<div><a href="http://docs.wxwidgets.org/stable/wx_wxdialog.html#wxdialogshowmodal" target="_blank" style="color: rgb(0, 0, 204); "></a> </div><div><div>But wxWidgets (at least as of R14B on Windows) doesn't seem to keep that promise.</div>
<div><br></div><div>I put these lines into the shell:</div><div><br><div>  Wx= wx:new().</div><div>  F = wxFrame:new(Wx, -1, "A frame").</div><div>  wxFrame:show(F).</div><div>  D = wxMessageDialog:new (F, "Let's talk.").</div>
<div><br></div><div>When I asked for this:</div><div><br></div><div>  wxDialog:getReturnCode(D).</div><div><br></div><div>I got 0 (zero).  When I set it to 1</div><div><br></div><div>  wxDialog:setReturnCode(D,1).</div><div>
<br></div><div>I got "ok".  When I asked to see the value I'd set</div><div><br></div><div>  wxDialog:getReturnCode(D).</div><div><br></div><div>I got back 1 -- as I'd asked.  But when I did</div><div><br>
</div><div>   wxDialog:showModal(D).</div><div><br></div><div>and hit the OK button, the return value was 5100.</div><div><br></div><div>Why?  Is there some reason for this?  For my wxWidgets tutorial</div><div><br></div>
<div>  <a href="http://www.idiom.com/~turner/wxtut/wxwidgets.html" target="_blank" style="color: rgb(0, 0, 204); ">http://www.idiom.com/~turner/wxtut/wxwidgets.html</a></div><div><br></div><div>even if I'm stuck with 5100, I'd like, at the very least, to be able to explain why it's 5100.  Does anybody know?</div>
<div><br></div><font color="#888888"><font color="#888888"><div>-michael turner</div></font></font></div></div></div></span>