Assigning a parallel subclass?

From a custom class, I have created two different subclasses – in a way parallel subclasses, the only differences lie in their custom events handling.
One subclass has all working methods included – name it subclass work –, the other is for testing purposes and setting preferences – subclass Prefs.
So when the preferences window is opened, I close the active subclass work and want to open a copy of it as a subclass prefs.

But how can I easily convert one class to another? The compiler gives me a warning because both classes are different, of course. Basically it would be enough to exchange their superclass’ properties, but I shy from manually copying each property from one class to another. There must be a way to override the compiler’s warning, or am I wrong?


you can define a constructor for pref as
Constructor(ref as work)
and then setup your data as you need

That looks good. At least the compiler warning is gone for now, need to debug a lot until I can test it. Thanks a lot, Antonio!
The Constructor call is one of those advanced feature that make me wish for some more examples in the docs.