equal
deleted
inserted
replaced
132 self fetchGlobals |
132 self fetchGlobals |
133 ]. |
133 ]. |
134 ^ globals at:aKey ifAbsent:exceptionValue |
134 ^ globals at:aKey ifAbsent:exceptionValue |
135 ! |
135 ! |
136 |
136 |
|
137 classNamed:aString |
|
138 "return the class with name aString, or nil if absent. |
|
139 To get to the metaClass, append ' class' to the string." |
|
140 |
|
141 |cls sym meta| |
|
142 |
|
143 "be careful, to not invent new symbols ..." |
|
144 sym := aString asSymbol. |
|
145 cls := self at:sym ifAbsent:[]. |
|
146 cls isBehavior ifTrue:[^ cls]. |
|
147 |
|
148 (aString endsWith:' class') ifTrue:[ |
|
149 |
|
150 meta := self classNamed:(aString copyWithoutLast:6). |
|
151 meta notNil ifTrue:[ |
|
152 ^ meta class |
|
153 ]. |
|
154 ]. |
|
155 ^ nil |
|
156 ! |
|
157 |
137 keysAndValuesDo:aTwoArgBlock |
158 keysAndValuesDo:aTwoArgBlock |
138 globals isNil ifTrue:[ |
159 globals isNil ifTrue:[ |
139 self fetchGlobals |
160 self fetchGlobals |
140 ]. |
161 ]. |
141 globals keysAndValuesDo:aTwoArgBlock |
162 globals keysAndValuesDo:aTwoArgBlock |