wxMessageDialog return value

73 views
Skip to first unread message

Owens, Kieran

unread,
Sep 25, 2003, 8:01:37 AM9/25/03
to wxPytho...@lists.wxwindows.org

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.


Owens, Kieran

unread,
Sep 25, 2003, 8:47:46 AM9/25/03
to wxPytho...@lists.wxwindows.org
Aaargh!

Good Grief! I'm a knucklehead! I was checking for the wrong value! wxYES
!= wxID_YES.

Thanks Thorsten.

Regards

Kieran


-----Original Message-----
From: Thorsten Henninger [mailto:he...@brainbot.com]
Sent: Thursday, September 25, 2003 8:41 AM
To: wxPytho...@lists.wxwindows.org

Hi,

I guess this is right

wxID_YES = 5103
wxID_NO = 5104

Thorsten

Owens, Kieran wrote:

>---------------------------------------------------------------------
>To unsubscribe, e-mail: wxPython-user...@lists.wxwindows.org
>For additional commands, e-mail:
>wxPython-...@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:he...@brainbot.com

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

Thorsten Henninger

unread,
Sep 25, 2003, 8:41:28 AM9/25/03
to wxPytho...@lists.wxwindows.org
Hi,

I guess this is right

wxID_YES = 5103
wxID_NO = 5104

Thorsten

Owens, Kieran wrote:

Reply all
Reply to author
Forward
0 new messages