Hi Siemen

IIRC this was known as "wide classes", there is some paper about it.
Cheers,

Hernán

2018-03-02 15:45 GMT-03:00 Siemen Baader <siemenbaa...@gmail.com>:
> Hi all,
>
> it seems like we cannot cast the class of object to its subclass if that
> subclass has had new instance variables added to it:
>
> http://forum.world.st/changing-the-class-of-an-existing-object-to-a-subclass-td4239041.html
>
> But I (think) I need it - I'm transforming a DOM tree from XMLHTMLParser's
> XMLElement s to a subclass of Iliad's ILHTMLBuilderElement s, and for single
> occurences I would like to use the more specific subclasses, like
> ILCheckboxElement. I can make the cast manually, I know when it is safe to
> do.
>
> What else could I do, apart from removing the element from its tree,
> creating a new (subclass) instance and then putting this element in place of
> the old one? Some #perform or `super` magic..?
>
> hm..
>
> thanks for any pointers!
>
> -- Siemen

Reply via email to