[squeak-dev] The Inbox: Monticello-fbs.582.mcz

Frank Shearar frank.shearar at gmail.com
Tue Dec 31 10:02:16 UTC 2013


On 30 December 2013 18:27,  <commits at source.squeak.org> wrote:
> A new version of Monticello was added to project The Inbox:
> http://source.squeak.org/inbox/Monticello-fbs.582.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-fbs.582
> Author: fbs
> Time: 30 December 2013, 6:26:56.48 pm
> UUID: 6845156d-643f-4247-b27f-863116008ff2
> Ancestors: Monticello-fbs.581
>
> If you can't find a binding for the class, just return nil, instead of throwing a KeyNotFound error. This matches the old behaviour.
>
> =============== Diff against Monticello-fbs.581 ===============
>
> Item was changed:
>   ----- Method: MCClassDefinition>>actualClass (in category 'accessing') -----
>   actualClass
>         | binding environment |
>         environment := EnvironmentRequest signal ifNil: [Smalltalk globals].
> +       binding := environment bindingOf: name ifAbsent: [^ nil].
> -       binding := environment bindingOf: name ifAbsent: [(KeyNotFound key: name) signal].
>         ^ binding value.!
>
> Item was changed:
>   ----- Method: MCMethodDefinition>>actualClass (in category 'accessing') -----
>   actualClass
>         | actualClass binding environment |
>         environment := EnvironmentRequest signal ifNil: [Smalltalk globals].
> +       binding := environment bindingOf: className ifAbsent: [^ nil].
> -       binding := environment bindingOf: className ifAbsent: [(KeyNotFound key: className) signal].
>         actualClass := binding value.
>         ^ classIsMeta
>                 ifTrue: [actualClass classSide]
>                 ifFalse: [actualClass].!

|foo|
foo := Environment withName: 'Foo'.
"Possibly 'Smalltalk globals exportSelf'."
foo import: Smalltalk globals.
Installer sm update.
[Installer sm install: 'Control'] on: EnvironmentRequest do: [:e | e
resume: foo].
{Smalltalk globals. foo} collect: [:env | env hasClassNamed:
#DelimitedDynamicVariable]. "=> #(false true)"

Try it, try it, you will see!

frank


More information about the Squeak-dev mailing list