"Castings" are aliens in the Smalltalk world, although there is a
#become*: method family, I would discourage you from using it as an
alternative unless you really need to do it.
If your use case is that concrete, I'd do something like:
`ILHTMLBuilderElement fromXMLElement: anXMLElement`
Then all subclasses of `ILHTMLBuilderElement` will know what to look
and what to omit from the `XMLElement` parameter.
Regards!
Esteban A. Maringolo
2018-03-02 17:08 GMT-03:00 Stephan Eggermont <stephan@stack.nl>:
> Siemen Baader <siemenbaader@gmail.com> wrote:
>>
>> 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..?
>
> Use composition? Generate accessing code where necessary.
> Is this very performance critical code?
>
> Stephan
>
>
>