A tree can only have 1 root.  The first root showing is searched for ABC and if found it is deleted.  The other things you are inserting at root are not searched.

Whether this is a bug in the docs or not, I'm not sure.

The basic TreeView class implementation is unchanged from what IBM did.  Your usage here is not what they expected.

I'll have to take a closer look at things later.  But for now, if you only create 1 root and have multiple items with the same text under that root, it will delete all of them.

Mark Miesfeld

On Thu, Jan 24, 2013 at 10:25 AM, Mark Miesfeld <> wrote:
I just tried a simple test and it works fine for me.  It deletes 5 items, 3 items, 2 items when that is the number of items with the same text.

Mark Miesfeld

On Thu, Jan 24, 2013 at 9:29 AM, Staffan Tylen <> wrote:
I'm facing an issue with the treeview find method that looks like a bug. Consider the following:

  text = tree~itemText(hItem)
  do forever
     found = tree~find(text)
     if found = 0 then leave

This loop always seems to delete only the first existing item, the second find always returns zero even when additional items exists. I can provide a full sample program, should that be needed.


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
Oorexx-users mailing list