Curious: TreeCtrl.GetNextVisible() vs CustomTreeCtrl.GetNextVisible()

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
The docs for both are clear and correct:

TreeCtrl:
GetNextVisible(*self*, *item*) <#wx.TreeCtrl.GetNextVisible>

Returns the next visible item *or an invalid item* if this item is the last 
visible one.

-----------

CustomTreeCtrl

GetNextVisible(*self*, *item*) 
<#wx.lib.agw.customtreectrl.CustomTreeCtrl.GetNextVisible>

Returns the next visible item.

An instance of GenericTreeItem 
<wx.lib.agw.customtreectrl.GenericTreeItem.html#wx.lib.agw.customtreectrl.GenericTreeItem>
 *or None* if there are no next visible items.  


Migrating code from TreeCtrl to a CustomTreeCtrl -- it's so close to a 
drop-in replacement but this tripped me up: was expecting an invalid tree 
item but got an unexpected None. Why the difference? Couldn't the Python 
CustomTreeCtrl code just as easily have returned a nascent GenericTreeItem, 
analogous to what the treectlg.cpp wxWidgets code does for the TreeCtrl ?

Again, not a bug, and the difference is easily worked around -- but why the 
difference? Why *not* try to keep the same behavior?

-ck


-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/dd3cec65-fc6c-4ac0-acd5-a7d24f06f8f8n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.