]> git.saurik.com Git - wxWidgets.git/commitdiff
explain that wxRTTI macros must be used for OnCompareItems() to be called
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Oct 2006 00:52:09 +0000 (00:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Oct 2006 00:52:09 +0000 (00:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/treectrl.tex

index f609fbed0b3e64d427ddb57d6eb6d5082903b44b..a7f028a967566e0b09dcce670d601a907a2206b2 100644 (file)
@@ -765,7 +765,12 @@ items in the tree control. The function should return a negative, zero or
 positive value if the first item is less than, equal to or greater than the
 second one.
 
 positive value if the first item is less than, equal to or greater than the
 second one.
 
-The base class version compares items alphabetically.
+Please note that you \textbf{must} use wxRTTI macros 
+\helpref{DECLARE\_DYNAMIC\_CLASS}{declaredynamicclass} and 
+\helpref{IMPLEMENT\_DYNAMIC\_CLASS}{implementdynamicclass} if you override this
+function because otherwise the base class considers that it is not overridden
+and uses the default comparison, i.e. sorts the items alphabetically, which
+allows it optimize away the calls to the virtual function completely.
 
 See also: \helpref{SortChildren}{wxtreectrlsortchildren}
 
 
 See also: \helpref{SortChildren}{wxtreectrlsortchildren}