[Pkg] The Trunk: Tools-fbs.343.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 25 15:45:54 UTC 2011

Nicolas Cellier uploaded a new version of Tools to project The Trunk:

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

Name: Tools-fbs.343
Author: fbs
Time: 25 April 2011, 10:12:35.66 am
UUID: d1a76bdd-3761-8c48-9d0d-9087cae2e45e
Ancestors: Tools-nice.342

Fix class-rename-while-method-selected bug, found by Balázs Kósi. Thanks!

=============== Diff against Tools-nice.342 ===============

Item was changed:
  ----- Method: Browser>>renameClass (in category 'class functions') -----
  	| oldName newName obs |
  	self hasClassSelected ifFalse: [^ self].
  	self okToChange
  		ifFalse: [^ self].
  	oldName := self selectedClass name.
  	newName := self request: 'Please type new class name' initialAnswer: oldName.
  	newName = ''
  		ifTrue: [^ self].
  	"Cancel returns ''"
  	newName := newName asSymbol.
  	newName = oldName
  		ifTrue: [^ self].
  	(self selectedClass environment includesKey: newName)
  		ifTrue: [^ self error: newName , ' already exists'].
  	self selectedClass rename: newName.
+ 	selectedClassName := newName.
  	self changed: #classList.
- 	self classListIndex: (self classListIndexOf: newName).
  	obs := self systemNavigation
  				allCallsOn: (self selectedClass environment associationAt: newName).
  	obs isEmpty
  		ifFalse: [self systemNavigation
  				browseMessageList: obs
  				name: 'Obsolete References to ' , oldName
  				autoSelect: oldName]!

More information about the Packages mailing list