I tried to create a subclass of the MobileContainer in an IOS and it won’t work:
But it’s certainly possible to do for DesktopContainer:
As expected, you don’t get the UI editor, but you do get to add any methods, properties, etc., to the class.
I am curious if this is a bug or platform limitation?
I created a new iOS project with a parent and child class and saved it as version control project. Opened up Class1 in a text editor and changed its super to MobileContainer:
Opening up the project again shows the expected result: A MobileContainer subclass:
However, due to some other limitations, I can’t set the super of any new MobileContainer classes to this custom MobileContainer class.
After some more text file editing:
All is good. (Or is it? )
And we can run without issue:
To create new subclasses based on the custom MobileContainer subclass, the Duplicate command works:
Clearly this could be working around some very deliberate limitations put in place by XOJO. I’ll work on a Feedback report so it’s in the system.
Thanks; added my .
But after some playing around with my workaround, somethings are broken: The compiler can’t find some basic super class properties (.Enabled) when I call them from my custom subclass.
1 Like