<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Georgia">It doesn't see it. Doing the second part only
will result in two bindings being created: "b" and "value".
"value" is never initialized to anything so it is nil. If you do
only the first part, just one binding is created: "a".<br>
<br>
Cheers,<br>
Bob<br>
<br>
<br>
</font>
<div class="moz-cite-prefix">On 11/2/13 6:42 AM, Frank Shearar
wrote:<br>
</div>
<blockquote
cite="mid:CAJbhyRHcNRs=pbdSC9d6ybE7M2AbC-xQK_Gm1uL5SxZ8X-yjmA@mail.gmail.com"
type="cite">
<pre wrap="">a := OrderedCollection new.
(Smalltalk globals instVarNamed: 'declarations')
keysAndValuesDo: [:key :value |
a add: value].
b := OrderedCollection new.
Smalltalk allClassesAndTraitsDo: [:v | b add: value].
b
Note that value should be scoped only to the first block. That second
block should _not_ be able to see value. But it can, so (a) the code
compiles and (b) produces #(nil nil nil ...).
frank
</pre>
</blockquote>
<br>
</body>
</html>