[squeak-dev] The Trunk: System-ul.331.mcz

commits at source.squeak.org commits at source.squeak.org
Sat May 22 00:02:59 UTC 2010


Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.331.mcz

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

Name: System-ul.331
Author: ul
Time: 22 May 2010, 1:58:19.908 am
UUID: 346284a3-9d95-2f4d-8988-61d9205c2dd6
Ancestors: System-spd.330

Implemented Bert's idea to use *autogenerated as the category(prefix) for autogenerated preference accessors, so these won't be part of the System package. Since these methods are compiled "silently", their source code won't be stored, so formatting doesn't matter, therefore every method is a one-liner.

=============== Diff against System-spd.330 ===============

Item was changed:
  ----- Method: Preferences class>>compileAccessMethodForPreference: (in category 'initialization') -----
  compileAccessMethodForPreference: aPreference
  	"Compile an accessor method for the given preference"
  
+ 	self class 
+ 		compileSilently: (
+ 			'{1} ^self valueOfFlag: {2} ifAbsent: [ {3} ]'
+ 				format: {
+ 					aPreference name asString.
+ 					aPreference name asSymbol printString.
+ 					aPreference defaultValue storeString }) 
+ 		classified: '*autogenerated - standard queries'!
- 	self class compileSilently: (aPreference name, '
- 	^ self valueOfFlag: #', aPreference name, ' ifAbsent: [', aPreference defaultValue storeString, ']') classified: 'standard queries'!

Item was changed:
  ----- Method: Preferences class>>compileHardCodedPref:enable: (in category 'personalization') -----
  compileHardCodedPref: prefName enable: aBoolean
  	"Compile a method that returns a simple true or false (depending on the value of aBoolean) when Preferences is sent prefName as a message"
  
+ 	self class 
+ 		compileSilently: (
+ 			'{1} ^{2}'
+ 				format: {
+ 					prefName asString.
+ 					aBoolean storeString })
+ 		classified: '*autogenerated - hard-coded prefs'.
- 	self class compileSilently: (prefName asString, '
- 	"compiled programatically -- return hard-coded preference value"
- 	^ ', aBoolean storeString) classified: 'hard-coded prefs'.
  	
  "Preferences compileHardCodedPref: #testing enable: false"!

Item was removed:
- ----- Method: Preferences class>>useFormsInPaintBox (in category 'standard queries') -----
- useFormsInPaintBox
- 	^ self
- 		valueOfFlag: #useFormsInPaintBox
- 		ifAbsent: [false]!




More information about the Squeak-dev mailing list