Hi,
Just did a sanity check for LASTADDNODE when one or more nodes are removes
in IupTree.
Already committed to CVS. IUP next version is scheduled for this month.
Best,
Scuri
From: Benoit Germain [mailto:[email protected]]
Sent: quinta-feira, 12 de julho de 2012 13:35
To: IUP discussion list.
Subject: Re: [Iup-users] [IUP 3.6 Windows 7] IupTree DELNODE and LASTADDNODE
Let's consider a node with index N, that has M children.
There are 4 possibilites when removing nodes( at last as exposed by the Lua
binding):
remove everything: clear lastaddnode as well
remove node N: clear lastaddnode if it was N.
remove node N and all its children: if lastaddnode < N, do nothing. clear
lastaddnode if it is in the range [N,N+M], else lastaddnode -= M+1
remove children of node N: if lastaddnode <= N, do nothing. clear
lastaddnode if it is in the range [N+1,N+M]. else lastaddnode -= M
Doesn't it catch every situation?
Now I agree that it it is better to use lastaddnode right after adding a
node. But then I like tidy things :-).
Regards,
Benoit.
2012/7/12 Antonio Scuri <[email protected]>
Hi,
What I can do to improve that is to check is the node being removed is the
last added node, and then clear that value. And to also clear that value
when all nodes are removed. But I dont know if I will catch all situations.
The idea behind the last added node is for it to be used right after the
node was added.
Best,
Scuri
From: Benoit Germain [mailto:[email protected]]
Sent: terça-feira, 10 de julho de 2012 05:22
To: IUP discussion list
Subject: [Iup-users] [IUP 3.6 Windows 7] IupTree DELNODE and LASTADDNODE
Hello,
When I have a tree that contains some nodes and I delete them with
tree.delnode = "ALL", I notice that tree.lastaddnode still contains some
non-nil value though it is no longer relevant. When nodes are removed in a
way that affects the id of the last added node, shouldn't tree.lastaddnode
be updated to the correct id if the node still exists, and set to nil when
the node itself is removed?
Regards,
--
Benoit.
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users