From 22bea944d244ae135f41ebaa3a2e7e10cb925756 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Oct 2006 00:52:09 +0000 Subject: [PATCH] explain that wxRTTI macros must be used for OnCompareItems() to be called git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/treectrl.tex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index f609fbed0b..a7f028a967 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -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. -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} -- 2.45.2