What is an EmbeddedContainer?

The release notes for 2021r3 state

“Setting a class’ super to EmbeddedContainer or EmbeddedWindowControl is no longer allowed.”

I’ve searched the documentation and can find no reference to any classes named “EmbeddedContainer” or “EmbeddedWindowControl”.

From memory its the object that a container control is placed into at runtime and is probably only internally useful (but others might be able to add more info on that). I’m sure I played around with it a long time ago, but can’t recall why off the top of my head, something to do with finding containers with introspection.

You can see it when you debug a window with a container on it and see the list of Window.Controls.

In some scenarios, at least for Desktop API 1.0, Xojo would present you with the EmbeddedWindowControl rather than its ContainerControl instance, which made ContainerControls a bit of a pain to work with as it wasn’t easy to get back to a ContainerControl from an EmbeddedWindowControl.

I think (but haven’t had time to test) in API 2.0, they’ve ironed these issues out so that you should only ever get a DesktopContainer rather than those instances where you might instead have received an EmbeddedContainer. Either way, you shouldn’t be able to set the super to EmbeddedContainer or EmbeddedWindowControl.

1 Like

I have a project in 2021r2 using ContainerControls whose super shows as “ContainerControl” in the IDE. In the debugger they’re displayed as EmbeddedWindowControls. I guess it’s not something I need to be concerned with :slight_smile:

Nope. No need to be concerned until you run in to an issue where you expect ContainerControl but instead receive an EmbeddedWindowControl.

1 Like