[squeak-dev] The Trunk: Morphic-kb.317.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 4 01:07:59 UTC 2010


A new version of Morphic was added to project The Trunk:
http://source.squeak.org/trunk/Morphic-kb.317.mcz

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

Name: Morphic-kb.317
Author: kb
Time: 4 February 2010, 12:38:52.66 am
UUID: 588d876b-9198-40e4-9343-2764fbdc817e
Ancestors: Morphic-kb.316

 - quick fix for: http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144057.html

The fix adds a check to MenuMorph >> displayFiltered: to prevent invoking selectItem:event: without an event, because the current implementation doesn't support that.

=============== Diff against Morphic-kb.316 ===============

Item was changed:
  ----- Method: MenuMorph>>displayFiltered: (in category 'keyboard control') -----
  displayFiltered: evt
  	| matchStr allItems matches feedbackMorph |
  	matchStr := self valueOfProperty: #matchString.
  	allItems := self submorphs select: [:m | m isKindOf: MenuItemMorph].
  	matches :=  allItems select: [:m | | isMatch | 
  		isMatch := 
  			matchStr isEmpty or: [
  				m contents includesSubstring: matchStr caseSensitive: false].
  		m isEnabled: isMatch.
  		isMatch].
  	feedbackMorph := self valueOfProperty: #feedbackMorph.
  	feedbackMorph ifNil: [
  		feedbackMorph := 
  			TextMorph new 
  				autoFit: true;
  				color: Color darkGray.
  		self
  			addLine;
  			addMorphBack: feedbackMorph lock.
  		self setProperty: #feedbackMorph toValue: feedbackMorph.
  		self fullBounds.  "Lay out for submorph adjacency"].
  	feedbackMorph contents: '<', matchStr, '>'.
  	matchStr isEmpty ifTrue: [
  		feedbackMorph delete.
  		self submorphs last delete.
  		self removeProperty: #feedbackMorph].
+ 	" This method is invoked with evt = nil from MenuMorph >> removeMatchString. 
+ 	The current implementation can't select an item without an event. "
+ 	(evt notNil and: [ matches size >= 1 ]) ifTrue: [
+ 		self selectItem: matches first event: evt]!
- 	"matches size >= 1 ifTrue: [
- 		self selectItem: matches first event: evt]"!




More information about the Squeak-dev mailing list