On Jan 9, 2009, at 3:58 AM, Paolo Bonzini wrote:
if i do:
file := File name: '/Users/Spooneybarger'
file all do: [ :e | e isDirectory ifTrue: [ e directories
printNl ] ]
i get no output other than: "Global garbage collection... done,
heap grown"
over and over and over
The problem here is that every file that you get in "file all do:"
is in
turn a RecursiveFileWrapper. In other words what you wanted was just
file all directories do: [ :each | each printNl ]
(try "file all directories").
I haven't applied you patch yet, as I want to understand how it
would be without the patch,
( I'm the curious sort like that... ) and I didn't get what I would
except from your example:
st> ( File name: '/Users/Spooneybarger' ) all directories do:
[ :each | each printNl ]
"Global garbage collection... done"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
"Global garbage collection... done, heap grown"
...snip...
What am I doing wrong?