The Trunk: System-pre.1110.mcz

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

The Trunk: System-pre.1110.mcz

commits-2
Patrick Rein uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-pre.1110.mcz

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

Name: System-pre.1110
Author: pre
Time: 2 October 2019, 3:12:18.602738 pm
UUID: 9b6a14ee-b7dd-664d-b120-58ec32ad76b7
Ancestors: System-mt.1109

Adds asSimpleSetter and isSimpleSetter to String.

=============== Diff against System-mt.1109 ===============

Item was changed:
  ----- Method: Preferences class>>addPragmaPreference: (in category 'add/remove') -----
  addPragmaPreference: pragma
  "Note that there will be no accessor method generated because the pragma's method does already govern that."
 
  | preference |
 
  ((pragma keyword beginsWith: #preference:) and: [self respondsTo: pragma keyword])
  ifFalse: [
  "no pragma pref to be defined. do nothing"
  ^ self].
  self assert: pragma methodClass isMeta.
 
  preference := self
  perform: pragma keyword
  withArguments: pragma arguments.
 
  preference
  provider: pragma methodClass theNonMetaClass
  getter: pragma method selector
+ setter: pragma method selector asSimpleSetter.
- setter: pragma method selector asMutator.
 
  self atomicUpdatePreferences: [ :copyOfDictionaryOfPreferences |
  copyOfDictionaryOfPreferences
  at: preference id
  put: preference].
 
  ^ preference!

Item was added:
+ ----- Method: String>>asSimpleSetter (in category '*System-Support') -----
+ asSimpleSetter
+ "Return a setter message from a getter message. For example, #name asMutator returns #name:"
+ ^ self last = $:
+ ifTrue: [ self asSymbol ]
+ ifFalse: [ (self copyWith: $:) asSymbol ]!

Item was added:
+ ----- Method: String>>isSimpleSetter (in category '*System-Support') -----
+ isSimpleSetter
+
+ ^ self isKeyword and: [self numArgs = 1]!