Mac/Windows dialog behavior

Sorry to ask a question without as much information as I should have, but I develop on a Mac and can usually only steal a few minutes' time on a Windows machine to test the py2exe version.

My app contains a custom dialog that changes a data item if the user dismisses it with OK, doesn't if the user Cancels. It works fine on Mac. On Windows, as far as I can tell, it's not doing anything. The dialog acts as it should, but pressing OK (or the Enter key) doesn't make the change happen. And the one quick test I could do suggests that all the code inside the
    if dialogReturnValue == wx.WX_OK:
block is not getting executed at all. Is there something I don't understand about the two platforms? (Well -- a thousand things; but I mean. . .)

Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com

I don't know why what you wrote WOULD work on Mac, but try replacing

     if dialogReturnValue == wx.WX_OK:

With

     if dialogReturnValue == wx.ID_OK:

David

···

-----Original Message-----
From: Charles Hartman [mailto:charles.hartman@conncoll.edu]
Sent: Thursday, February 17, 2005 3:58 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Mac/Windows dialog behavior

Sorry to ask a question without as much information as I should have,
but I develop on a Mac and can usually only steal a few minutes' time
on a Windows machine to test the py2exe version.

My app contains a custom dialog that changes a data item if the user
dismisses it with OK, doesn't if the user Cancels. It works fine on
Mac. On Windows, as far as I can tell, it's not doing anything. The
dialog acts as it should, but pressing OK (or the Enter key) doesn't
make the change happen. And the one quick test I could do
suggests that
all the code inside the
    if dialogReturnValue == wx.WX_OK:
block is not getting executed at all. Is there something I don't
understand about the two platforms? (Well -- a thousand things; but I
mean. . .)

Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar http://villex.blogspot.com

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

This is quite bizarre. It turns out that WX_OK does not even exist:

  >>> import wx
  >>> wx.ID_OK
  5100
  >>> wx.WX_OK
  Traceback (most recent call last):
    File "<stdin>", line 1, in ?
  AttributeError: 'module' object has no attribute 'WX_OK'
  >>>

That exception must have been thrown. Or was "swallowed", somewhere.

/Jean Brouwers

David Woods wrote:

···

I don't know why what you wrote WOULD work on Mac, but try replacing

    if dialogReturnValue == wx.WX_OK:

With

    if dialogReturnValue == wx.ID_OK:

David

-----Original Message-----
From: Charles Hartman [mailto:charles.hartman@conncoll.edu] Sent: Thursday, February 17, 2005 3:58 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Mac/Windows dialog behavior

Sorry to ask a question without as much information as I should have, but I develop on a Mac and can usually only steal a few minutes' time on a Windows machine to test the py2exe version.

My app contains a custom dialog that changes a data item if the user dismisses it with OK, doesn't if the user Cancels. It works fine on Mac. On Windows, as far as I can tell, it's not doing anything. The dialog acts as it should, but pressing OK (or the Enter key) doesn't make the change happen. And the one quick test I could do suggests that all the code inside the
  if dialogReturnValue == wx.WX_OK:
block is not getting executed at all. Is there something I don't understand about the two platforms? (Well -- a thousand things; but I mean. . .)

Charles Hartman
Professor of English, Poet in Residence http://cherry.conncoll.edu/cohar http://villex.blogspot.com

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

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