[etoys-dev] Etoys: Etoys-Richo.111.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Feb 28 14:29:44 EST 2012


Ricardo Moran uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-Richo.111.mcz

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

Name: Etoys-Richo.111
Author: Richo
Time: 28 February 2012, 4:27:50 pm
UUID: d6b04048-9a47-2649-8409-1429f9897fed
Ancestors: Etoys-kfr.110

* Preserved "Subject" information in the EToyProjectDetailsMorph when reading in older projects, transferring the info into the free-form "Tags" field.

=============== Diff against Etoys-kfr.110 ===============

Item was changed:
  ----- Method: EToyProjectDetailsMorph>>fillInDetails (in category 'project details') -----
  fillInDetails
  	"Given that the receiver's namedFields is already set up, give each such field its appropriate initial value."
  
+ 	| elements |
- 	| elements item |
  	theProject ifNotNil:
  		[namedFields at: 'projectname' ifPresent:
  			[:field | field contentsWrapped: theProject name]].
  
  	projectDetails ifNotNil:
  		[self fieldToDetailsMappings do: [ :tuple |
  			namedFields at: tuple first ifPresent: [ :field |
  				projectDetails at: tuple second ifPresent: [ :data |
  					elements := self choicesFor: tuple first.
  					elements
  						ifNil:
  							[field contentsWrapped: data]
  						ifNotNil:
+ 							[| item |
+ 							item := elements detect: [:el | el first = data] ifNone: [nil].
- 							[item := elements detect: [:el | el first = data] ifNone: [nil].
  							item ifNotNil:
  								[field contentsWrapped: item third translated]
  							ifNil:
+ 								[field contentsWrapped: '(none)' translated]]]]].
+ 		"Compatibility with older projects"
+ 		projectDetails at: 'projectcategory' ifPresent: [:data |
+ 			((self choicesFor: #subject)
+ 				detect: [:el | el first = data]
+ 				ifNone: [nil])
+ 					ifNotNil: [:item |
+ 						namedFields
+ 							at: #keywords
+ 							ifPresent: [:field |
+ 								field contentsWrapped:
+ 									(item third translated,
+ 									', ',
+ 									field contents asString)]]]]!
- 								[field contentsWrapped: '(none)' translated]]]]]]!



More information about the etoys-dev mailing list