X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..f363e05c6d7d29ac152c86b526e25b983d05eea5:/docs/latex/wx/porting.tex diff --git a/docs/latex/wx/porting.tex b/docs/latex/wx/porting.tex index ca99053109..bc15b659c2 100644 --- a/docs/latex/wx/porting.tex +++ b/docs/latex/wx/porting.tex @@ -57,7 +57,8 @@ for some notes on using member functions for callbacks. wxWindows 2.0 will banis callback functions (and OnMenuCommand), and nearly all event handling will be done by functions taking a single event argument. So in future you will have code like: -{\small\begin{verbatim} +{\small +\begin{verbatim} void MyFrame::OnOK(wxCommandEvent& event) { ... @@ -188,7 +189,7 @@ is now {\bf wxDialog:ShowModal}. This is part of a more fundamental change in wh control may tell the dialog that it caused the dismissal of a dialog, by calling {\bf wxDialog::EndModal} or {\bf wxWindow::SetReturnCode}. Using this information, {\bf ShowModal} now returns the id of the control that caused dismissal, -giving greater feedback to the application than just TRUE or FALSE. +giving greater feedback to the application than just true or false. If you overrode or called {\bf wxDialog::Show}, use {\bf ShowModal} and test for a returned identifier, commonly wxID\_OK or wxID\_CANCEL. @@ -258,7 +259,8 @@ returned in wxWindows 1.xx, your application will need to be changed. Usually yo simplify your application's allocation and deallocation of memory for the returned string, and simply assign the result to a wxString object. For example, replace this: -{\small\begin{verbatim} +{\small +\begin{verbatim} char* s = wxFunctionThatReturnsString(); s = copystring(s); // Take a copy in case it is temporary .... // Do something with it @@ -268,7 +270,8 @@ and simply assign the result to a wxString object. For example, replace this: with this: -{\small\begin{verbatim} +{\small +\begin{verbatim} wxString s = wxFunctionThatReturnsString(); .... // Do something with it \end{verbatim}