Class references not always updated while moving class to another namespace

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

Class references not always updated while moving class to another namespace

Reinout Heeck-2
Hi,

I just had to fix a few dozens of references to a class after moving that
class to another namespace.

This is how you can reproduce the problem in a base image:

1 Create a class X in name space Smalltalk.Graphics.
2 Make a reference to X (without it's namespace Smalltalk.Graphics) in
some method y in Object.
3 Move class X to name space Refactory.Browser.
4 Reference in method y is now broken.

The name spaces used are just taken to illustrate the problem.

Problem occurs with 'vw7.4.1' and 'vw7.5 - oct06.1'

Regards,
Adriaan.


Reply | Threaded
Open this post in threaded view
|

RE: Class references not always updated while moving class to another namespace

Terry Raymond
Adriaan

Hi Adriaan. While I agree this is a problem, I think the
only reasonable solution is to notify the user of the
newly undeclared reference. My choice to fix the reference
would be to create a namespace import for the class and
not change the reference to a dotted reference. However,
if this were done automatically and the user was unaware
of it, he could create another class with the same name
and get conflicts.

Terry
 
===========================================================
Terry Raymond       Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

> -----Original Message-----
> From: Adriaan van Os [mailto:[hidden email]]
> Sent: Tuesday, October 10, 2006 8:07 AM
> To: [hidden email]
> Subject: Class references not always updated while moving class to another
> namespace
>
> Hi,
>
> I just had to fix a few dozens of references to a class after moving that
> class to another namespace.
>
> This is how you can reproduce the problem in a base image:
>
> 1 Create a class X in name space Smalltalk.Graphics.
> 2 Make a reference to X (without it's namespace Smalltalk.Graphics) in
> some method y in Object.
> 3 Move class X to name space Refactory.Browser.
> 4 Reference in method y is now broken.
>
> The name spaces used are just taken to illustrate the problem.
>
> Problem occurs with 'vw7.4.1' and 'vw7.5 - oct06.1'
>
> Regards,
> Adriaan.