[Pkg] The Trunk: Morphic-ar.405.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 30 04:28:13 UTC 2010

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

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

Name: Morphic-ar.405
Author: ar
Time: 29 March 2010, 9:26:50.478 pm
UUID: a7b0717c-c4d5-544e-b5cc-ba5abb09d577
Ancestors: Morphic-ar.404

Fix smartSearch in the search bar. When having an exact hit on a class name it would browse the metaclass instead of the class itself.

=============== Diff against Morphic-ar.404 ===============

Item was changed:
  ----- Method: SearchBarMorph>>smartSearch (in category 'search') -----
  	"Take the user input and perform an appropriate search"
  	| input |
  	input := self contents asString ifEmpty:[^self].
+ 	(Smalltalk bindingOf: input) ifNotNil:[:assoc| | global |
- 	(Smalltalk bindingOf: input) ifNotNil:[:assoc|
  		"It's a global or a class"
+ 		global := assoc value.
+ 		^ToolSet browse: (global isBehavior ifTrue:[global] ifFalse:[global class]) selector: nil.
- 		^ToolSet browse: assoc value class selector: nil.
  	(SystemNavigation new allImplementorsOf: input asSymbol) ifNotEmpty:[:list|
  		^SystemNavigation new
  			browseMessageList: list
  			name: 'Implementors of ' , input
  	input first isUppercase ifTrue:[
  		(Utilities classFromPattern: input withCaption: '') ifNotNil:[:aClass|
  			^ToolSet browse: aClass selector: nil.
  	] ifFalse:[
  		^ToolSet default browseMessageNames: input
  	"Not found"
  	Beeper beepPrimitive.!

More information about the Packages mailing list