Inst var mix-up after adding accessors with OB

Zulq Alam me at zulq.net
Thu Oct 25 15:50:06 UTC 2007


I saved my image and then in the package universe browser, I clicked on 
"select upgrades" and then "install selection". I'm assuming this sorted 
out the dependencies for me.

Damien Cassou wrote:
> Hi Zulq,
> 
> I think this was a bug in the RefactoringEngine that Mathieu Suen
> corrected some months ago. If you use a recent image, this problem
> should not appear.
> 
> When you say "if you upgrade to 0.391", you only changed the
> OmniBrowser package? Neither the RefactoringEngine, nor the
> OBRefactory package?
> 
> 2007/10/25, Zulq Alam <me at zulq.net>:
>> If you follow these steps using OB 0.382:
>>
>>         1) Define class Thing
>>         2) Add inst var "foo"
>>         3) Add accessors for "foo" using menu
>>         4) Add inst var "bar" AFTER "foo"
>>         5) Add accessors for "bar" using menu
>>
>> the instance variable name list will be sorted from:
>>
>>         instanceVariableNames: 'foo bar'
>>
>> to:
>>
>>         instanceVariableNames: 'bar foo'
>>
>> and the accesors for "foo" will get and set "bar" such that:
>>
>>         thing := Thing new.
>>         thing foo: 'foo'.
>>         thing bar: 'bar'.
>>         thing foo -> thing bar  "'bar'->'bar'"
>>
>> If you upgrade to 0.391 the instance variable name list is not sorted so
>>   effectivley the problem goes away.
>>
>> I'd like to understand how the OB (or refactoring engine) could modify
>> the class description without triggering a recompile of the methods?
>>
>> I tried writing a test case but without knowing how it's side stepping
>> the usual recompile I got stuck.
>>
>> Regards,
>> Zulq.
>>
>>
>>
>>
>>
> 
> 




More information about the Squeak-dev mailing list