[squeak-dev] The Trunk: 46Deprecated-mt.3.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 8 10:35:49 UTC 2015


Marcel Taeumel uploaded a new version of 46Deprecated to project The Trunk:
http://source.squeak.org/trunk/46Deprecated-mt.3.mcz

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

Name: 46Deprecated-mt.3
Author: mt
Time: 8 May 2015, 12:35:45.873 pm
UUID: 8ff69d8d-675d-2342-a98a-342fb0a5ddbd
Ancestors: 46Deprecated-mt.2

Old search bar morph added to keep that code in case of regression bugs with the new, toolbuilder-driven search bar.

=============== Diff against 46Deprecated-mt.2 ===============

Item was changed:
+ SystemOrganization addCategory: #'46Deprecated-Morphic'!
- SystemOrganization addCategory: #'46Deprecated-Morphic-Pluggable Widgets'!

Item was changed:
  PluggableListMorph subclass: #PluggableMessageCategoryListMorph
  	instanceVariableNames: 'getRawListSelector priorRawList'
  	classVariableNames: ''
  	poolDictionaries: ''
+ 	category: '46Deprecated-Morphic'!
- 	category: '46Deprecated-Morphic-Pluggable Widgets'!
  
  !PluggableMessageCategoryListMorph commentStamp: '<historical>' prior: 0!
  A variant of PluggableListMorph designed specially for efficient handling of the --all-- feature in message-list panes.  In order to be able *quickly* to check whether there has been an external change to the list, we cache the raw list for identity comparison (the actual list is a combination of the --all-- element and the the actual list).!

Item was added:
+ TextMorph subclass: #SearchBarMorph
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: '46Deprecated-Morphic'!

Item was added:
+ ----- Method: SearchBarMorph>>activate: (in category 'search') -----
+ activate: event
+ 
+ 	event hand newKeyboardFocus: self.
+ 	self selectAll!

Item was added:
+ ----- Method: SearchBarMorph>>fillStyle (in category 'initialize') -----
+ fillStyle
+ 
+ 	^backgroundColor!

Item was added:
+ ----- Method: SearchBarMorph>>initialize (in category 'initialize') -----
+ initialize
+ 
+ 	super initialize.
+ 	text := Text new.
+ 	backgroundColor := TranslucentColor gray alpha: 0.3.
+ 	self width: 200.
+ 	self crAction: (MessageSend receiver: self selector: #smartSearch:).
+ 	self setBalloonText: 'Searches for globals and methods'.!

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



More information about the Squeak-dev mailing list