]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/html/faqgen.htm
applied typos and spelling error fixes patch from Olly Betts
[wxWidgets.git] / docs / html / faqgen.htm
index d7fad5bc1913a1c13e9e093d6661b185937d5e5c..d945ff7ff8dd747ed1b147148ac0d4b9a5cd4ba0 100644 (file)
@@ -1,4 +1,3 @@
-
 <HTML>
 
 <HEAD>
@@ -31,6 +30,7 @@ See also <a href="faq.htm">top-level FAQ page</a>.
 <li><a href="#specific">How does wxWindows 2 support platform-specific features?</a></li>
 <li><a href="#stl">Does wxWindows use STL? or the standard string class?</a></li>
 <li><a href="#richedit">Is there a rich edit/markup widget for wxWindows 2?</a></ li>
+<li><a href="#exceptions">How to use C++ exceptions with wxWindows?</a></ li>
 <li><a href="#dev">How is wxWindows 2 being developed?</a></li>
 <li><a href="#distrib">How is wxWindows 2 distributed?</a></li>
 <li><a href="#future">What are the plans for the future?</a></li>
@@ -130,10 +130,10 @@ platform-independent code, such as the wxTreeCtrl and wxListCtrl classes.<P>
 No. This is a much-discussed topic that has (many times) ended with the conclusion that it is in
 wxWindows&#39; best interests to avoid use of templates. Not all compilers can handle
 templates adequately so it would dramatically reduce the number of compilers
-and platforms that could be supported. It would also be undersirable to make
+and platforms that could be supported. It would also be undesirable to make
 wxWindows dependent on another large library that may have to be downloaded and installed.
 In addition, use of templates can lead to executable bloat, which is something
-wxWindows 2 is strenously trying to avoid.<P>
+wxWindows 2 is strenuously trying to avoid.<P>
 
 The standard C++ string class is not used, again because it is not available to all compilers,
 and it is not necessarily a very efficient implementation. Also, we retain more flexibility
@@ -172,6 +172,34 @@ no wxWindows wrapper for these (but text attribute functions are being added in
 
 <P>
 
+<h3><a name="exceptions">How to use C++ exceptions with wxWindows?</a></h3>
+
+wxWindows library itself is unfortunately <i>not</i> exception-safe (as its
+initial version predates, by far, the addition of the exceptions to the C++
+language). However you can still use the exceptions in your own code and use
+the other libraries using the exceptions for the error reporting together with
+wxWindows.
+
+<p>
+There are a few issues to keep in mind, though:
+<ul>
+    <li>You shouldn&#39;t let the exceptions propagate through wxWindows code,
+        in particular you should always catch the exceptions thrown by the
+        functions called from an event handler in the handler itself and not
+        let them propagate upwards to wxWindows.
+
+    <li>You may need to ensure that the compiler support for the exceptions is
+        enabled as, considering that wxWindows itself doesn&#39;t use the
+        exceptions and turning their support on results in the library size
+        augmentation of 10% to 20%, it is turned off by default for a few
+        compilers. Moreover, for gcc (or at least its mingw version) you must
+        also turn on the RTTI support to be able to use the exceptions, so you
+        should use <tt>--disable-no_rtti --disable-no_exceptions</tt> options
+        when configuring the library (attention to the double negation).
+</ul>
+
+<p>
+
 <H3><a name="dev">How is wxWindows 2 being developed?</a></H3>
 
 We are using the <a href="cvs.htm">CVS</a> system to develop and maintain wxWindows. This allows