[BUG][TEST][FIX] WhiskerBrowser fullBrowse from a class definition

German Morales germanmorales at delta-sys.com
Fri Mar 7 23:03:37 UTC 2003


Hello,

Selecting browse full in a Browser (or Refactoring Browser) from a class
definition cause an error since the browser sends:

fullBrowseClass: TheClassYouSelected selector: #Definition

WhiskerBrowser fails finding a selector named #Definition, so you get an
error.

I fixed Browser (already changed by WhiskerBrowser) to check for
#Definition and call #fullBrowseClass: instead of
#fullBrowseClass:selector:, but I'm not sure if this is the correct place
for the fix.


German Morales



-------------- next part --------------
'From Squeak3.4gamma of ''7 January 2003'' [latest update: #5170] on 7 March 2003 at 7:56:14 pm'!
"Change Set:		WhiskerBrowserTests
Date:			7 March 2003
Author:			German Morales

Shows an error when selecting full browse from a definition of a Class"!

TestCase subclass: #WhiskerBrowserTest
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Whisker-Tests'!

!WhiskerBrowserTest methodsFor: 'Testing' stamp: 'gm 3/7/2003 19:50'!
testBrowserFullOnClassSelector
	[self
		shouldnt: [Browser fullOnClass: Object selector: #Definition]
		raise: Error.]ensure:[self currentWhiskerWindow delete]! !

!WhiskerBrowserTest methodsFor: 'accessing' stamp: 'gm 3/7/2003 19:48'!
currentWhiskerWindow
	| windows collapsedWindows |
	windows _ SystemWindow
				windowsIn: self currentWorld
				satisfying: [:w | "(search expanded windows first)"
					w isCollapsed not].
	collapsedWindows _ SystemWindow
				windowsIn: self currentWorld
				satisfying: [:w | w isCollapsed].
	windows addAll: collapsedWindows.
	^windows
				detect: [:w | w isKindOf: WhiskerWindow]
				ifNone: [].

! !

-------------- next part --------------
'From Squeak3.4gamma of ''7 January 2003'' [latest update: #5170] on 7 March 2003 at 7:56:17 pm'!
"Change Set:		WhiskerBrowserFix
Date:			7 March 2003
Author:			German Morales

fix on fullOnClass: aClass selector: aSelector to support #Definition as selector"!


!Browser class methodsFor: 'instance creation' stamp: 'gm 3/7/2003 19:52'!
fullOnClass: aClass selector: aSelector 
	"Open a new full browser set to class."
	| brow classToUse |
	Preferences browseFullOpensWhisker
		ifTrue: [^ aSelector = #Definition ifTrue: [WhiskerBrowser openExistingBrowserOnClass: aClass] ifFalse: [
 WhiskerBrowser openExistingBrowserOnClass: aClass selector: aSelector]
].
	classToUse _ Preferences browseToolClass.
	brow _ classToUse new.
	brow setClass: aClass selector: aSelector.
	classToUse
		openBrowserView: (brow openEditString: nil)
		label: brow labelString! !




More information about the Squeak-dev mailing list