[squeak-dev] The Inbox: System-mt.1122.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Nov 18 13:49:42 UTC 2019

A new version of System was added to project The Inbox:

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

Name: System-mt.1122
Author: mt
Time: 18 November 2019, 2:49:37.103051 pm
UUID: 9fc8f687-9772-7244-9a7b-e655b26e9f84
Ancestors: System-mt.1121

(Disclaimer: Just to get a throught out of my head.)


Having #asSimpleSetter and #asSimpleGetter, add a convenient way to read/write objects having only key/value-pairs at hand. When processing some JSON data, for example. This API reads less "meta" than, for example, #perform: or #instVarAt: ...

Further reading:

Morph >> #setProperty:toValue:
Morph >> #valueOfProperty:
UserInterfaceTheme >> #set:to:
UserInterfaceTheme >> #get:
Dictionary >> #at:put:
Dictionary >> #at:
Object >> #instVarAt:put:
Object >> #instVarAt:
Object >> #instVarNamed:put:
Object >> #instVarNamed:

=============== Diff against System-mt.1121 ===============

Item was added:
+ ----- Method: Object>>get: (in category '*System-Support') -----
+ get: property
+ 	"Meta-programming to access object state."
+ 	^ self perform: property asSimpleGetter!

Item was added:
+ ----- Method: Object>>set:to: (in category '*System-Support') -----
+ set: property to: value
+ 	"Meta-programming to change object state."
+ 	self perform: property asSimpleSetter with: value.!

More information about the Squeak-dev mailing list