MobileContainer control subclass… No?

I tried to create a subclass of the MobileContainer in an IOS and it won’t work:

48b1b16db0d416418293b5045e43d512e468ea34_2_624x500

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? :thinking:)

And we can run without issue:

To create new subclasses based on the custom MobileContainer subclass, the Duplicate command works:

image

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.

Already reported: https://tracker.xojo.com/xojoinc/xojo/-/issues/73975

1 Like

Thanks; added my :+1:.

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