Question about RefactoringBrowser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about RefactoringBrowser

Herbert König
Hello,

I 've built an application with a class that's grown way too fat and I
now want to reuse it. I made a superclass and make the old class its subclass.

After that I thought I'd use RefactoringBrowser to move up the
instvars and methods I like into the more general case.

So I select the instvar, use RB selection pullUp and get the debugger
like in the attached error....gif, saying the instvar is multiply
defined.

What to make out of this? Actually the instvar is only defined in that
class (see references.gif). Maybe because I access the instvar
directly to set it and via an accessor to retrieve it?

Any hint appreciated.

Thanks,

Herbert                          mailto:[hidden email]


=?ISO-8859-15?B?RXJyb3JfcHL8ZlplaXRTdW1tZS5naWY=?= (7K) Download Attachment
References.gif (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about RefactoringBrowser

Herbert König
Hello,

......

HK> Any hint appreciated.

btw 3.8 with mysql driver and RB.

Cheers

Herbert










Reply | Threaded
Open this post in threaded view
|

[Bug??] Question about RefactoringBrowser

Herbert König
In reply to this post by Herbert König
Hello,


HK> So I select the instvar, use RB selection pullUp and get the debugger
HK> like in the attached error....gif, saying the instvar is multiply
HK> defined.

after digging in deeper, the problem is that
ClassBuilder>>validateInstvars:from:forSuper: receives the instvar I
want to move up twice in the instvarArray.

Looking down the callstack this array is created from a string which is
built using Class>>addInstVarName: which seems to be sent one time too
often.

The sender of that message is beyond my current knowledge of
smalltalk but this seems to be a bug.

I'm reluctant to enter it into Mantis as it might as well just be that
I don't know enough.

I've created two classes, if you file them in and try to move
ivarIwantToMoveUp into the superclass via RB you get the error.


Cheers,

Herbert                            mailto:[hidden email]


NewToBeSuperclass.st (334 bytes) Download Attachment
TooFatSubclass.st (980 bytes) Download Attachment