[etoys-dev] Etoys: MorphicExtras-bf.15.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Sep 4 19:36:03 EDT 2010

Bert Freudenberg uploaded a new version of MorphicExtras to project Etoys:

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

Name: MorphicExtras-bf.15
Author: bf
Time: 5 September 2010, 1:35:36 am
UUID: ff53d4c2-c1d3-4d9a-98da-7da959065e64
Ancestors: MorphicExtras-bf.14

Fix reverting book pages. Needed for the castle tutorial (SQ-752)

=============== Diff against MorphicExtras-bf.14 ===============

Item was changed:
  ----- Method: BookMorph>>markForRevert: (in category 'new reverting') -----
  markForRevert: page
  	"Save the current page for future revert."
  	| key revertPage revertDict |
  	page setProperty: #revertMarked toValue: true.
  	revertDict _ self pagesForRevert.
  	key _ page valueOfProperty: #revertKey ifAbsent: [0].
  	revertPage := revertDict at: key ifAbsent: [nil].
  	(key = 0 or: [revertPage isNil])
+ 			[key := pages inject: 0 into:
+ 				[:max :p | max max: (p  valueOfProperty: #revertKey ifAbsent: [0]) + 1].
- 			[key := revertDict ifEmpty: [1] ifNotEmpty: [revertDict keys max + 1].
  			page setProperty: #revertKey toValue: key.
  			revertDict at: key put: page copy]
  			self deletePageAlongWithPlayers: revertPage.
  			revertDict at: key put: page copy]!

Item was changed:
  ----- Method: BookMorph>>prepareToBeSaved (in category 'fileIn/out') -----
  	super prepareToBeSaved.
  	self removeProperty: #pagesForRevert.
+ 	pages do: [:p | p removeProperty: #revertKey].

More information about the etoys-dev mailing list