How do you remove a subclass completely from the system programmatically?

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

How do you remove a subclass completely from the system programmatically?

John Small
Hi,

    The Behavior>>#removeSubclass: method's comment is:

        "Private - Remove the argument, aClass, from the subclasses of the
receiver.
            WARNING: This method does not completely remove a class from the
system."

Question: how do you remove a subclass programmatically from the
system?

Thanks!

John


Reply | Threaded
Open this post in threaded view
|

Re: How do you remove a subclass completely from the system programmatically?

John Small
I think the correct way is to use:

        Smalltalk developmentSystem deleteClassHierarchy: aClassToDelete

Is this right?


"John Small" <[hidden email]> wrote in message
news:[hidden email]...
> Hi,
>
>     The Behavior>>#removeSubclass: method's comment is:
>
>         "Private - Remove the argument, aClass, from the subclasses of the
> receiver.
>             WARNING: This method does not completely remove a class from
the

> system."
>
> Question: how do you remove a subclass programmatically from the
> system?
>
> Thanks!
>
> John
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How do you remove a subclass completely from the system programmatically?

Ian Bartholomew-16
John,

> I think the correct way is to use:
>
>         Smalltalk developmentSystem deleteClassHierarchy: aClassToDelete
>
> Is this right?

I tend to use

aClass removeFromSystem

even though it is marked as private.  You don't get any prompts (unless you
do something wrong?) so it makes it more condusive to working
programatically, in the background.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: How do you remove a subclass completely from the system programmatically?

Andy Bower
Ian, John,

> I tend to use
>
> aClass removeFromSystem
>
> even though it is marked as private.  You don't get any prompts (unless
you
> do something wrong?) so it makes it more condusive to working
> programatically, in the background.

#removeFromSystem is the recommended way.

Best Regards,

Andy Bower
Dolphin Support
http://www.object-arts.com
---
Are you trying too hard?
http://www.object-arts.com/Relax.htm
---