>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: Tree list dissappears
Nicolai.Ohm
Tree list dissappears
Posted: Thursday, May 18, 2006 5:21 AM (EST)

Please can you investigate what is wrong here?

 

fmSel_Make;sz;t;ŒWSELF
'fmSel'ŒWI'Delete'
ŒWSELF„'fmSel'ŒWI'New' 'Form' 'Open'('size'(sz „ 24.5 73))

t„ŒWI'trSel.New'  'Tree'  ('where'(1.5 1,¯4.5 ¯58+sz))

t„ŒWI'bnApply.New'  'Button'  ('where' 2 40 1.5 15)('caption' '&Apply Random List')
t ŒWI'onClick' "ŒWI'..trSel.list'((¼30),(1,?29½2),[1.5](›'Item '),¨•¨¼30)ªŒWI'..trSel.DeleteNodes' 8 9 10 29 30"

t„ŒWI'bnCurrList.New' 'Button' ('where' 4 40 1.5 15)('caption' '&Show Current List')
t ŒWI'onClick' "ŒWI'..trSel.list'ªŒTCNL"

 

 

I’m setting a list to a tree and than I delete some nodes of the list.


However, sometimes the list completely disappears (you need to hit the button “Apply Random List” several times, let’s say 20 times). Although the list is there (hit the button “Show Current List”), it’s not displayed!


I need this because I hold all tree lists in APL nested arrays and have written a function that occasionally updates the related windows controls by inserting the new nodes and deleting the obsolete nodes (usually in a Defer statement of the Tree control). However sometimes the list completely disappears.


Comments:

Author Thread:
Nicolai.Ohm
Tree list dissappears
Posted: Friday, May 19, 2006 5:47 AM (EST)

Found a workaround for the problem: Always delete nodes in a loop:

 

:for j :in lst[indx;1]                  © bug: sometimes list disappears
   :if j¹(ŒWI'list')[;1]                © workaround: delete nodes in a loop
      0 0½ŒWI'DeleteNodes'j
   :endif
:endfor

     

Support
Tree list dissappears
Posted: Friday, May 19, 2006 12:11 PM (EST)

Another simpler workaround for this problem is to specify the nodes in descending order when deleting multiple nodes.  What's causing your problem is that DeleteNodes isn't correctly handling the situation that arises when the nodes are in ascending order and contains nodes for a parent node and it's children (child nodes).  When you delete the parent node, it's children are automatically deleted.  However, when you delete the parent node and explicitly delete it's children in the same DeleteNodes command, the list doesn't display in the Tree, which would imply a bug in DeleteNodes.

Thank you for bringing this matter to our attention.

APL2000 Support


 

     

Support
Tree list dissappears
Posted: Monday, June 26, 2006 1:35 PM (EST)

FYI, the bug in DeleteNodes will be fixed in version 6.2 of APL+Win.

 

APL2000 Support

     



APL2000 Official Web Site

Most good judgment comes from experience. Most experience comes from bad judgment.
--- Anonymous

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |