[Seaside] WATree

William Harford seaside at harford.org
Tue Jun 13 12:33:41 UTC 2006

I am having a little trouble with WATree. I feel like I am doing  
something obviously wrong but I can not figure it out.

I am trying to get WATree to give me a directory listing with the  
ability to download the files. I have been able to get it to work on  
the first level of the tree but none of the subdirectories will  
expand.  I click the "+" and the page reloades but the "+" stays a  
"+" and the tree does not expand.

I am using WATree like so ....

tree _ WATree new.
tree labelBlock: [ :dir | dir localName ].
tree root: (FileDirectory on: (self extraFilesPath));	
	childrenBlock: [ :dir | |d |
			( dir isKindOf:FileStream ) ifTrue:[
			((FileDirectory on:(dir fullName)) entries) collect:[:de |
				( de at: 4 ) ifTrue:[
					d _ dir directoryNamed:  ( de at: 1 ).
				] ifFalse:[
					d _ dir fileNamed:  ( de at: 1 ).
		selectBlock: [:file |
			self session download: (file file contents)
			mimeType: ('application/octet-stream')
			filename: (file name). ];
		canSelectBlock: [ :file | file isKindOf:FileStream].

Why do subdirectories not expand ?


More information about the Seaside mailing list