Yeah, that's more correct. Since the MessageBox is being called indirectly the actual value it returns isn't being utilized.<div><br></div><div>Although now I'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'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"><<a href="mailto:darryl.wallace@prosensus.ca">darryl.wallace@prosensus.ca</a>></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'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's going to exit using the result as it's argument. <br>
If you just select 'OK' 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. Which is the value of the enum of StandardButton. So you're seeing normal termination, but if the Ok button were the result, then the exit code would be 1024. 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>