Changing the class of an instance
Lothar Schenk
lothar.schenk at gmx.de
Wed Nov 12 18:17:41 UTC 2003
Giovanni Corriga wrote:
> Hi
>
> Is there a way to change at runtime the class of an instance?
>
> In my application, XPSwiki (http://www.agilexp.org/XPSwiki) I need to be
> able to delete a page. Since a great part of the organizational
> functionalities of the tool depends on the class of the single pages
> (Task, UserStory etc), when deleting a page I need to change its class
> from i.e. UserStory to DeletedPage.
>
> Do you have any suggestion on how I can implement this?
You seem to be looking for something like a werewolf, first a human, then a
wolf, then a human again. :)
As Andreas Raab has already pointed out, what you are trying to do is probably
not very healthy.
Why can't you just _replace_ the page in question (say, an instance of
UserStory) by an instance of DeletedPage?
Lothar
--
"Walk this world with me"
More information about the Squeak-dev
mailing list
|