[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')
FileDirectoryTreeItem('CroquetSDK-1.0.18-Squeak4.1')('CroquetSDK-1.0.18-
Squeak4.1'))
Then, for the rendering it goes through the following method calls.....
In WATree>>renderNode:aNode on html
There are three calls:
renderNodeButton
renederNodeLabel
renderNodeChildren
In renderNodeChildren, WATree correctly sees that
FileDirectoryTreeItem('bin')('bin')
Has the following children:
{FileDirectoryTreeItem('i686-pc-linux-gnu')('i686-pc-linux-gnu') .
FileDirectoryTreeItem('prefs')('prefs')}
It detects the children and then the code section:
(self isExpanded: aNode) ifTrue: [
html unorderedList: [
children do: [ :each |
self
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....
t.
-------------- 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