The Inbox: System-ct.1118.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: System-ct.1118.mcz

commits-2
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1118.mcz

==================== Summary ====================

Name: System-ct.1118
Author: ct
Time: 26 October 2019, 9:53:56.908469 pm
UUID: 813aa07b-dde6-7f46-af06-552f9f2f1b37
Ancestors: System-mt.1116

Adds execute-around utility to change an AppRegistry default temporarily

"Usage:"
SoundService setDefault: DummySoundSystem new during: [SoundService beep]

=============== Diff against System-mt.1116 ===============

Item was added:
+ ----- Method: AppRegistry class>>setDefault:during: (in category 'defaults') -----
+ setDefault: aClassOrNil during: aBlock
+
+ | previousDefault |
+ previousDefault := self default.
+ self default: aClassOrNil.
+ ^ aBlock ensure: [
+ self default: previousDefault]!