The Trunk: Morphic-ar.405.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-ar.405.mcz

commits-2
Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.405.mcz

==================== 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') -----
  smartSearch
  "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.!