]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed 2 bugs in 2 lines of wxFileSelector example code
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 1 Jul 2002 11:45:37 +0000 (11:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 1 Jul 2002 11:45:37 +0000 (11:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/function.tex

index 188d6394a82ec223e1c7090a0ef05040f89e5c33..14744e8644f82962ba89cf6c7ebd78c5c8326571 100644 (file)
@@ -1385,11 +1385,13 @@ The application must check for an empty return value (the user pressed
 Cancel). For example:
 
 \begin{verbatim}
-const wxString& s = wxFileSelector("Choose a file to open");
-if (s)
+wxString filename = wxFileSelector("Choose a file to open");
+if ( !filename.empty() )
 {
-  ...
+    // work with the file
+    ...
 }
+//else: cancelled by user
 \end{verbatim}
 
 \wxheading{Include files}