From f0f120733975fabdc614d17ab19aa8b6d47d8226 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 1 Jul 2002 11:45:37 +0000
Subject: [PATCH] fixed 2 bugs in 2 lines of wxFileSelector example code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/function.tex | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index 188d6394a8..14744e8644 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -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}
-- 
2.50.0

