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].! |
On 30 December 2013 18:27, <[hidden email]> 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 |
On 31 December 2013 10:02, Frank Shearar <[hidden email]> wrote:
> On 30 December 2013 18:27, <[hidden email]> 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! One thing that this change highlights is that SystemNavigation currently controls all system categories. Instead, it needs to become Environmentally sensitive. Or, seeing as an Environment has an EnvironmentInfo which has a SystemOrganizer, something somewhere needs to signal an EnvironmentRequest when storing stuff in a SystemOrganizer. This, I suspect, means that references to SystemNavigation must go. frank |
Free forum by Nabble | Edit this page |