[BUG][FIX] Refactoring Browser

raymondasselin at sympatico.ca raymondasselin at sympatico.ca
Thu Sep 13 01:27:30 UTC 2001


Hi, Daniel thank you for the Refactoring Browser.
I think I found a bug, but better to check the FIX as I'm a newbie in
Squeak and Smalltalk.

The bug:
  when you are in the RB and you click the 'optional button' labeled
'inst var' just to see the instance variables without selecting one, the
RB is bringing a 'navigator browseGlobalInstVarRefsTo: name in: self
selectedClassOrMetaClass'. This a non welcome behavior.

The fix: changing notNil for isEmpty 
  I check 'RefactoringBrowser browseInstVarRefs and found what seems to
be the problem.

The code was:
browseInstVarRefs

	| name |

	name := self selectInstVar.

	name notNil 

		ifTrue: [self navigator browseGlobalInstVarRefsTo: name in: self
selectedClassOrMetaClass]

I changed it for:
browseInstVarRefs
	| name |
	name _ self selectInstVar.
	name isEmpty
		ifFalse: [self navigator browseGlobalInstVarRefsTo: name in: self
selectedClassOrMetaClass]

Hope this is good and this help.
Raymond




More information about the Squeak-dev mailing list