[Pkg] The Trunk: MorphicExtras-ar.62.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 15 23:49:53 UTC 2009

Andreas Raab uploaded a new version of MorphicExtras to project The Trunk:

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

Name: MorphicExtras-ar.62
Author: ar
Time: 15 December 2009, 3:48:39 am
UUID: cc012b9a-8273-dd44-be33-7d7919e23ddd
Ancestors: MorphicExtras-ul.61

Make flaps registration and unregistration a bit more robust in the case of non-existing flaps. Allows TextMorphTest to succeed.

=============== Diff against MorphicExtras-ul.61 ===============

Item was changed:
  ----- Method: Flaps class>>registerQuad:forFlapNamed: (in category 'flaps registry') -----
  registerQuad: aQuad forFlapNamed: aLabel
  	"If any previous registration of the same label string is already known, delete the old one."
  	"aQuad received must be an array of the form {TargetObject. #command label  'A Help String'} 
  Flaps registerQuad: #(FileList2 openMorphicViewInWorld	'Enhanced File List'	'A nicer File List.')
  	forFlapNamed: 'Tools' "
  	self unregisterQuad: aQuad forFlapNamed: aLabel.
+ 	(self registeredFlapsQuads at: aLabel ifAbsent:[^self]) add: aQuad!
- 	(self registeredFlapsQuads at: aLabel) add: aQuad!

Item was changed:
  ----- Method: Flaps class>>registeredFlapsQuadsAt: (in category 'flaps registry') -----
  registeredFlapsQuadsAt: aLabel
  	"Answer the list of dynamic flaps quads at aLabel"
+ 	^ (self registeredFlapsQuads at: aLabel ifAbsent:[^#()])
- 	^ (self registeredFlapsQuads at: aLabel)
  		removeAllSuchThat: [:q | (self environment includesKey: q first) not or: [(self environment at: q first) isNil]]

More information about the Packages mailing list