[squeak-dev] The Trunk: System-mt.1086.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Aug 15 09:56:35 UTC 2019
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1086.mcz
==================== Summary ====================
Name: System-mt.1086
Author: mt
Time: 15 August 2019, 11:56:27.168945 am
UUID: ff933ddb-8d0d-f447-a77e-cef1e48bae95
Ancestors: System-mt.1085
Adds a way to get readable names for old-style preferences. Adds a way to get the source code you need to use those preferences in your projects.
=============== Diff against System-mt.1085 ===============
Item was added:
+ ----- Method: PragmaPreference>>codeString (in category 'menu') -----
+ codeString
+ "Answer the Smalltalk expressions to get the preference value."
+
+ ^ self provider name, ' ', getter!
Item was added:
+ ----- Method: Preference>>codeString (in category 'menu') -----
+ codeString
+ "Answer the Smalltalk expressions to get the preference value."
+
+ ^ 'Preferences valueOfFlag: #', self name!
Item was added:
+ ----- Method: Preference>>copyCode (in category 'menu') -----
+ copyCode
+ "Copy the code for the given preference to the clipboard"
+
+ Clipboard clipboardText: self codeString.!
Item was added:
+ ----- Method: Preference>>readableName (in category 'menu') -----
+ readableName
+ "Split camel-case preferences into a readable string with spaces."
+
+ | result |
+ result := (self name includes: Character space)
+ ifTrue: [self name asString copy]
+ ifFalse: [self name findFeatures joinSeparatedBy: ' '].
+
+ "Ensure first letter is uppercase"
+ result at: 1 put: (result at: 1) asUppercase.
+
+ ^ result!
More information about the Squeak-dev
mailing list
|