Hi,
If you use the refactoring create accessor for instance or class
variable some time fails:
If you have a class define as:
Object subclass: #A
instanceVariableNames: 'c b'
classVariableNames: ''
poolDictionaries: ''
category: 'Dummy'
And add A>>b: by hand.
After create the accessor for c with the refactoring in omnibrowser.
"A new b: 3" will affect c and not b.
This is because ob-refactoring sort the instance variable to display
in the alphabetical order:
ORCmdRefactoring>>instanceVariables
^ (target isKindOf: OBInstanceVariableNode)
ifTrue: [ Array with: target name ]
ifFalse: [ target theClass instVarNames asArray sort ]
I have patched this method with the #asSortedArray. See the attached
file
I think is the method #asArray who make the mess if you look at the
implementation of Array>>#asArray.
I would rather expect a copy of self.
I have open an issue:
http://bugs.squeak.org/view.php?id=6602 Mth