Skip to main content
JHarding
Senior
November 3, 2020
Solved

Why can't a custom container be used like a container created from within TouchGFX Designer

  • November 3, 2020
  • 2 replies
  • 864 views

Hello,

I'm back with some new questions! Thanks for always being helpful... here we go.

From within a class that I have extended the Container object, I am unable to simply use my object as such:

application().getCurrentScreen()->getRootContainer().add(myObj);

then my compiler throws this error:

no known conversion for argument 1 from 'modalBase*' to 'touchgfx::Drawable&'

If I try the same thing with a custom container that I created from within TouchGFX designer, I can compile just fine, and the code works as expected.

I am extending the Container object just as TouchGFX does:

class modalBase : public touchgfx::Container
{
public:
 modalBase();
 virtual ~modalBase() {}
 virtual void initialize();
protected:
 
private:
}

This topic has been closed for replies.
Best answer by JHarding

Not that I recall. I ended up using a crazy work around and don't have time to revisit this.

2 replies

Martin KJELDSEN
Principal III
November 25, 2020

Sorry i missed this.

Did you figure it out?

JHarding
JHardingAuthorBest answer
Senior
November 30, 2020

Not that I recall. I ended up using a crazy work around and don't have time to revisit this.