[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] wxDialog::OnOK() removed from wx
From: |
Greg Chicares |
Subject: |
[lmi] wxDialog::OnOK() removed from wx |
Date: |
Sun, 24 Sep 2006 22:47:37 +0000 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
Vadim--A few weeks ago, you mentioned that wxDialog::OnOK() has
been removed from the latest version of wx, and said there were
two ways to deal with situations where 'lmi' calls that function:
(1) Rewrite the code that calls it.
The 'lmi' trunk's wxID_OK handler is indeed not necessary, but
the 'skeleton' trunk does need it--so this is not the universal
solution, and we need to consider the alternative....
(2) Write its body inline. In wxmsw, this is simply
if ( Validate() && TransferDataFromWindow() )
{
EndDialog(wxID_OK);
}
However, in the 20060605 wx snapshot that we're still using in
production, there are numerous instances of that function:
gtk/dialog.cpp
gtk1/dialog.cpp
mac/carbon/dialog.cpp
mac/classic/dialog.cpp
motif/dialog.cpp
msw/dialog.cpp
os2/dialog.cpp
palmos/dialog.cpp
univ/dialog.cpp
not all of which are identical. For instance, wxuniv has an empty
function body, while wxgtk has the following
if (Validate() && TransferDataFromWindow())
{
if (IsModal())
{
EndModal(wxID_OK);
}
else
{
SetReturnCode(wxID_OK);
Show(false);
}
}
which isn't the same as the wxmsw version. Have those different
implementations all been made identical in the latest wx sources?
I'd like to avoid introducing any avoidable platform dependency.
- [lmi] wxDialog::OnOK() removed from wx,
Greg Chicares <=