Preparing for wxWidgets 2 |
It can be pretty annoying writing to an API that you know is going to change, and with a portability tool there's even a certain irony about it.
However, wxWidgets 2 shares many more similarities with earlier versions than it has differences. There's also a lot you can do right now to make porting relatively simple. Here are a few tips.
void MyFrame::OnOK(wxCommandEvent& event)
{
...
}
Note that you will be able to direct the event to the window object that originated it, an ancestor, or an event handler object that is plugged into the window object.
You may find that writing the extra code to call a member function isn't worth it at this stage, but the option is there.
Because wxForm uses a number of features to be dropped in wxWidgets 2, it will only be supported in the compatibility library, which is something you'll want to stop using as soon as practicable. The property classes should provide more satisfactory aesthetics anyway.