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
This commit is contained in:
Vadim Zeitlin 2006-10-28 00:52:09 +00:00
parent a059db11ff
commit 22bea944d2

View 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.
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}