Yeah, that&#39;s more correct. Since the MessageBox is being called indirectly the actual value it returns isn&#39;t being utilized.<div><br></div><div>Although now I&#39;m a little confused as to why the app is even returning a value when the MessageBox is closed. Even if you take sys.exit() out and just print out the value the app returns, it will still exit. Basically the whole app acts like a DialogBox that gets triggered by the MessageBox.</div>
<div><br></div><div>I&#39;m not sure I fully understand what all the exec() function does.<br><div><div><br><br><div class="gmail_quote">On Mon, Jan 12, 2009 at 10:50 AM, Darryl Wallace <span dir="ltr">&lt;<a href="mailto:darryl.wallace@prosensus.ca">darryl.wallace@prosensus.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d"><br>
Marc Nations wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why are you calling the exec_() function from inside the sys.exit() call?<br>
<br>
>From the way it&#39;s programmed, it looks like sys.exit() will execute and hold until it gets a result back from the MessageBox called inside the tray icon. At that point it&#39;s going to exit using the result as it&#39;s argument. <br>

If you just select &#39;OK&#39; then the MessageBox returns a 0, which will then cause a normal termination the program (exit code 0).<br>
</blockquote></div>
Actually, if you click OK, message box returns 1024. &nbsp;Which is the value of the enum of StandardButton. &nbsp;So you&#39;re seeing normal termination, but if the Ok button were the result, then the exit code would be 1024. &nbsp;It will return the error code based on what the application returns, not the messagebox.<br>
<font color="#888888">
<br>
darryl<br>
</font></blockquote></div><br></div></div></div>