Inst var mix-up after adding accessors with OB

Damien Cassou damien.cassou at gmail.com
Thu Oct 25 15:40:58 UTC 2007


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.
>
>
>
>
>


-- 
Damien Cassou



More information about the Squeak-dev mailing list