wxMessageDialog return value

I have a problem with a wxMessageDialog. I use the following snippet to
create the Dialog and to get the return value.

  dlg = wxMessageDialog(self, 'You have updated the text. Do you
want to save it?', 'Save?', wxYES_NO | wxYES_DEFAULT)
  rval = dlg.ShowModal()
  wxLogDebug("rval = %s" % str(rval))
  dlg.Destroy()

However, the returned value is neither wxYES nor wxNO. It is 5103 (yes)
or 5103 (no). It's consistent but not in agreement with the
documentation. The versions I'm running are python 2.3.1 on Windows XP
with wxPython 2.4.1.2u. Has anyone any thoughts on this? Am I doing
something incredibly dumb?

Thanks

Kieran

Notice: This message contains information that may be confidential and/or privileged. If you are not the intended recipient, you should not use, disclose or take any action based on this message. This message does not constitute investment advice.

Hi,

I guess this is right

wxID_YES = 5103
wxID_NO = 5104

Thorsten

Owens, Kieran wrote:

···

I have a problem with a wxMessageDialog. I use the following snippet to
create the Dialog and to get the return value.

dlg = wxMessageDialog(self, 'You have updated the text. Do you
want to save it?', 'Save?', wxYES_NO | wxYES_DEFAULT)
rval = dlg.ShowModal()
wxLogDebug("rval = %s" % str(rval))
dlg.Destroy()

However, the returned value is neither wxYES nor wxNO. It is 5103 (yes)
or 5103 (no). It's consistent but not in agreement with the
documentation. The versions I'm running are python 2.3.1 on Windows XP
with wxPython 2.4.1.2u. Has anyone any thoughts on this? Am I doing
something incredibly dumb?

Thanks

Kieran

Notice: This message contains information that may be confidential and/or privileged. If you are not the intended recipient, you should not use, disclose or take any action based on this message. This message does not constitute investment advice.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

--
brainbot technologies AG boppstrasse . 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:henni@brainbot.com