]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/html/faqgen.htm
don't initialize m_str twice in wxCharBuffer ctor
[wxWidgets.git] / docs / html / faqgen.htm
index 0c14ce0fe1762007d0fcc6de2137aa2ee2533495..43776e0578d1ed52468a0737679d1e7fa5010eb3 100644 (file)
@@ -1,19 +1,18 @@
-
 <HTML>
 
 <HEAD>
 <TITLE>wxWindows 2 FAQ: General</TITLE>
 </HEAD>
 
-<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#FF0000 VLINK=#000000>
+<BODY BGCOLOR=#FFFFFF TEXT=#000000 VLINK="#00376A" LINK="#00529C" ALINK="#313063">
 
 <font face="Arial, Lucida Sans, Helvetica">
 
-<table width=100% border=0 cellpadding=5 cellspacing=0>
+<table width=100% border=0 cellpadding=3 cellspacing=0>
 <tr>
-<td bgcolor="#C4ECF9">
-<font size=+1 face="Arial, Lucida Sans, Helvetica" color="#000000">
-wxWindows 2 FAQ: General
+<td bgcolor="#004080" align=left height=24 background="images/bluetitlegradient.gif">
+<font size=+1 face="Arial, Lucida Sans, Helvetica" color="#FFFFFF">
+<b>wxWindows 2 FAQ: General</b>
 </font>
 </td>
 </tr>
@@ -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>
@@ -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