[squeak-dev] The Trunk: MorphicExtras-kb.54.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 13 02:12:32 UTC 2009


David T. Lewis uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-kb.54.mcz

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

Name: MorphicExtras-kb.54
Author: kb
Time: 12 November 2009, 11:24:56 am
UUID: e4a8d825-9157-41f0-94b7-66624dd625ed
Ancestors: MorphicExtras-nice.53

 - fix: http://bugs.squeak.org/view.php?id=7411
   Fixed the building of edge selection menu in  Flaps class >> addLocalFlap.

=============== Diff against MorphicExtras-nice.53 ===============

Item was changed:
  ----- Method: Flaps class>>addLocalFlap (in category 'new flap') -----
  addLocalFlap
  	"Menu command -- let the user add a new project-local flap.  Once the new flap is born, the user can tell it to become a shared flap.  Obtain an initial name and edge for the flap, launch the flap, and also launch a menu governing the flap, so that the user can get started right away with customizing it."
  
  	| aMenu reply aFlapTab aWorld edge |
+ 	edge := self askForEdgeOfNewFlap.
- 	aMenu := MenuMorph entitled: 'Where should the new flap cling?' translated.
- 	aMenu defaultTarget: aMenu.
- 	#(left right top bottom) do:
- 		[:sym | aMenu add: sym asString translated selector: #selectMVCItem: argument: sym].
- 	edge := aMenu invokeModalAt: self currentHand position in: self currentWorld.
  
  	edge ifNotNil:
  		[reply := UIManager default request: 'Wording for this flap: ' translated initialAnswer: 'Flap' translated.
  		reply isEmptyOrNil ifFalse:
  			[aFlapTab := self newFlapTitled: reply onEdge: edge.
  			(aWorld := self currentWorld) addMorphFront: aFlapTab.
  			aFlapTab adaptToWorld: aWorld.
  			aMenu := aFlapTab buildHandleMenu: ActiveHand.
  			aFlapTab addTitleForHaloMenu: aMenu.
  			aFlapTab computeEdgeFraction.
  			aMenu popUpEvent: ActiveEvent in: ActiveWorld]]
  	
  !

Item was added:
+ ----- Method: Flaps class>>askForEdgeOfNewFlap (in category 'new flap') -----
+ askForEdgeOfNewFlap
+ 
+ 	
+ 	^MenuMorph 
+ 		chooseFrom: (#('left' 'right' 'top' 'bottom') collect: [ :each | each translated ])
+ 		values: #(left right top bottom)
+ 		lines: #()
+ 		title: 'Where should the new flap cling?' translated.
+ !




More information about the Squeak-dev mailing list