> "Node" should only be used when generically referring to branches, leaves, 
> and root.

Exactly. When I said “adding nodes,” I was talking about potentially
adding both branches and leaves. My sample code was a small section of
a larger one with more branches.


> I don't see anywhere in the documentation where ADDBRANCH-1 is a valid term,

Me neither, which is why I couldn't figure out why my flattree was a
blank until I started this thread and was told about it by others. I
tried looking for sample code, but the
flattree was only in C, not Lua. Looking at the documentation now, I
found a mention in iupflattree > attributes > hierarchy:

"ADDLEAFid (write only): Adds a new leaf after the reference node,
where id is the reference node identifier. Use id=-1 to add before the
first node."

Then it says that ADDBRANCHid works like ADDLEAFid, but I didn't make
the connection that to solve my problem, I had to create a branch to
serve as the first root, and to do that,
use ADDBRANCH-1. I think a note that explicitly says this in the
documentation would be helpful. Another thing I didn't realize right
away was that the root node's id is 0 and not -1.

You can find the earlier emails discussing it here:
https://sourceforge.net/p/iup/mailman/iup-users/thread/28CE84F4-E49B-4EB7-9E3F-307725A9AB4A%40hxcore.ol/#msg37390775
By the way, does anyone know what's wrong with my emails when they get
reposted to SourceForge? Do they come to other people's inboxes
looking that horrible with
code I didn't add? If not, I sent a support ticket and can hopefully
get that sorted out.

> I think the focus node should be the root node

I believe the focus node is whatever is currently selected.


_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to