[BUG][FIX]#alternativeBrowseIt use hardcoded browser

Hernan Tylim htylim at yahoo.com.ar
Sat Oct 2 17:38:46 UTC 2004


Hi, 

Sometime between 3.8a-6210 and 3.8a-6290 the preference
#alternativeBrowseIt got enabled. And for that reason CMD+b wasn't
working quite as expected. This .cs fixes that. Below is the cs preamble
with the explanation:

"Change Set:		AltBrowItUseRegistry-hpt
Date:				2 October 2004
Author:			Hernan Tylim

This .cs changes the way the preference #alternativeBrowseIt works.
>From this preference help #alternativeBrowseIt is supposed to bring up a
menu of matching class names when hitting ALT+B to open a browser on the
selected one.
The bug that this cs fixes is the browser which is used. The preference
help doesn't say anything about changing the browser, but it does, it
uses the Hierarchy Browser, not the common one used with ALT+B. So this
changeset fixes that.
The reason why this fix is important is because in this way
#alternativeBrowseIt will use the SystemBrowser registry and not a
hardcoded browser. If someone wants a Hierarchy Browser then it can be
registered at the registry.
"

BTW, I submitted this also on mantis

Saludos,
Hernán 
-------------- next part --------------
'From Squeak3.8alpha of 8 September 2004 [latest update: #6290] on 2 October 2004 at 2:30:17 pm'!
"Change Set:		AltBrowItUseRegistry-hpt
Date:			2 October 2004
Author:			Hernan Tylim

This .cs changes the way the preference #alternativeBrowseIt works.
From this preference help #alternativeBrowseIt is supposed to bring up a menu of matching class names when hitting ALT+B to open a browser on the selected one.
The bug that this cs fixes is the browser which is used. The preference help doesn't say anything about changing the browser, but it does, it uses the Hierarchy Browser, not the common one used with ALT+B. So this changeset fixes that.
The reason why this fix is important is because in this way #alternativeBrowseIt will use the SystemBrowser registry and not a hardcoded browser. If someone wants a Hierarchy Browser then it can be registered at the registry.
"!


!ParagraphEditor methodsFor: 'menu messages' stamp: 'hpt 10/2/2004 14:17'!
browseClassFromIt
	"Launch a hierarchy browser for the class indicated by the
	current selection. If multiple classes matching the selection
	exist, let the user choose among them."
	| aBrow aClass |
	self
		lineSelectAndEmptyCheck: [^ self].
	aClass := Utilities
				classFromPattern: (self selection string copyWithout: Character cr)
				withCaption: 'choose a class to browse...'.
	aClass
		ifNil: [^ view flash].
	self
		terminateAndInitializeAround: 
			[aBrow := SystemBrowser default new.
			aBrow setClass: aClass selector: nil.
			aBrow class
				openBrowserView: (aBrow openEditString: nil) label: 'System Browser'].! !



More information about the Squeak-dev mailing list