[Seaside] Generalizing WATree --update

Tim Murray tmurray at ecsorl.com
Wed Aug 18 14:38:51 UTC 2010

I tracked the problem down to WATree isExpanded.



When a user clicks on the + next to an expandable node, an entry is made
into the expanded IdentitySet.

So, after I expand my outmost directory and then click on the + next to
+bin the expanded IdentitySet now has two values in it:


an IdentitySet(FileDirectoryTreeItem('bin')('bin')


Then, for the rendering it goes through the following method calls.....


In WATree>>renderNode:aNode on html

There are three calls:






In renderNodeChildren, WATree correctly sees that

Has the following children:


{FileDirectoryTreeItem('i686-pc-linux-gnu')('i686-pc-linux-gnu') .


It detects the children and then the code section:


(self isExpanded: aNode) ifTrue: [

                                    html unorderedList: [

                                                children do: [ :each |

renderNode: each on: html ] ]


is run. However the call to self isExpanded fails....

   ^expanded includes:aNode



includes: anObject 

            ^ (array at: (self scanFor: anObject)) ~~ nil



So, in summary, my Object is in the expanded IdentitySet, but the code
does not see it and therefore does not render the children.


Now, to figure out how to work around this....






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100818/02850d9e/attachment-0001.htm

More information about the seaside mailing list