[Seaside] Generalizing WATree.
tmurray at ecsorl.com
Wed Aug 18 13:03:12 UTC 2010
I am trying to generalize WATree so that is can tree out a typical file
I copied WATreeFunctionalTest and modified it to display the existing
On top of my file tree.
Here is the modified initialize method:
tree := WATree new
labelBlock: [ :class | class name ];
childrenBlock: [ :class | class subclasses ];
selectBlock: [ :class | selected := class name ];
canSelectBlock: [ :class | class subclasses notEmpty ];
root: (CFileDirectoryTreeItem on: FileDirectory default);
labelBlock:[:cfdti | cfdti getLabel];
childrenBlock:[:cfdti | cfdti getChildren ];
Here is the modified renderTreeOn:html
html strong: 'Selected:'.
html render: selected.
" self break."
html render: tree.
I can't copy and paste the output directly into this, but it looks like
this with the filetree expanded one level:
* +Squeak 4.1.1beta2U.app
However, when I go to expand +MyLibrary it does not expand.
Looking at +Collection , which does work, the principle seems to be that
every "thing" in the blocks are "the same thing"
For the +Collection, that "same thing" is a Class. So the operations all
After a lot of trying , "The Same Thing" I am using is a
CFileDirectoryTreeItem. (I have tried a lot of different things).
What is troubling, is that the childrenBlock:[:cfdti | cfdti
getChildren] does in fact, return CFIleDirectoryTreeItems.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside