wx.ID_ problem

I am attempting to create a confirm quit dialog using this line:

retCode = wx.MessageBox("Are you sure you want to quit application?",
"Confirm quit", style = wx.YES_NO|wx.ICON_QUESTION)

retCode is 2 for YES and 8 for NO.

BUT when I look at wx.ID_YES and wx.ID_NO they are 5103 and 5104 respectively.

THEREFORE, my conditional comparison does not work.

What am I doing wrong???

Thanks!
Todd

Hi,

ยทยทยท

On Wed, Oct 21, 2009 at 10:54 AM, nurbs1 <nurbs1@gmail.com> wrote:

I am attempting to create a confirm quit dialog using this line:

retCode = wx.MessageBox("Are you sure you want to quit application?",
"Confirm quit", style = wx.YES_NO|wx.ICON_QUESTION)

retCode is 2 for YES and 8 for NO.

BUT when I look at wx.ID_YES and wx.ID_NO they are 5103 and 5104 respectively.

THEREFORE, my conditional comparison does not work.

What am I doing wrong???

import wx
wx.YES
2
wx.NO
8

Cody