cancel
Showing results for 
Search instead for 
Did you mean: 

Flex Button give error in Custom Container

Yunus ARI
Senior

I'm trying to design a custom container which have a flex button. When I do that getting an error in CustomContainer.hpp [RO] folder.

Error message; <namespace "touchgfx" has no member "AbstractButton">.

private:
 
    /*
     * Callback Handler Declarations
     */
    void buttonCallbackHandler(const touchgfx::AbstractButton& src);
    void flexButtonCallbackHandler(const touchgfx::AbstractButtonContainer& src);
 
    /*
     * Callback Declarations
     */
    touchgfx::Callback<RegisterElementBase, const touchgfx::AbstractButton&> buttonCallback;
    touchgfx::Callback<RegisterElementBase, const touchgfx::AbstractButtonContainer&> flexButtonCallback;

Can you help me about that. Thanks in advance.

11 REPLIES 11
Mathew Grabau
Associate III

Are you using designer? I added the following to the generated code:

#include <touchgfx/widgets/AbstractButton.hpp>

Though it needed to have the read-only attribute removed from the file of course.

Yes, I am using designer.​ Designer deleting it when I add something in read only files.

Yes, unfortunately that's the case. I use git to revert to a modified version once the designer overwrites it. I assume this is a bug in the designer. I hope it gets updated soon, but I've been saying that for a while. It seems the team has been very slow to provide updates.

Hi @Mathew Grabau​,

I was just having a piece of chocolate cake and a lovely cappuchino when i read this and i just had to grab my laptop to reply.

We've been spitting out updates and new features like there's no tomorrow but have been held back by internal deadlines. That's all going to change, starting with the release of TouchGF 4.12.3 (4.12.3!) with CubeMX 5.4. And will only improve from there on,

There's no bug. You're editing read-only files that are generated (inside generated/gui_generated) by the designer based on what you define on your canvas. Anything you modify in these generated files will get overwritten, so they're read-only for a reason. In every case, be it a view or a custom container, you'll have a concrete, derived version inside the gui/ folder that you can edit and version control.

/Martin

@Martin KJELDSEN​ 

I apologize for upsetting you. I came off as far too harsh there owing to my own frustrations in dealing with this. I hope that you'll be able to get back to enjoying your coffee and cake after this.

I'm very excited to hear that an awesome update is coming! Do you know when that might be? I'm glad to hear that internal things will change for the better.

I'll humbly retreat and attempt to be productive in solving this. The specific error is:

'AbstractButton': is not a member of 'touchgfx' (compiling source file ..\..\generated\gui_generated\src\containers\MenuListItemContainerBase.cpp)

It seems like a bug if the generated files don't compile to me? I'm not a fan of modifying those files at all. It was out of searching for a solution. It still does not compile if i modify the derived version to be right. This the Visual Studio project for the simulator if that makes a difference.

Kindest regards and my apologies,

Mathew

Hi @Mathew Grabau​,

Don't apologize. I was joking, but you did unintentionally hit a sore spot because we're extremely dilligent in trying to improve the product on multiple levels but haven't been able to release anything in almost a year which has been unsatisfying to say the least. Especially since i have to hold everyone off with promises.

You'll see a new release in a weeks time! I'm working on an article that will try to give an overview of new features, updates on integration with CubeMX/CubeIDE (which some of us have been working on exclusively for a while). Here's a teaser:

  1. 8-bit / 32-bit framebuffers
  2. Partial framebuffers
  3. L8 Pallette support
  4. Cacheable glyphs (aka Dynamic fonts and languages)
  5. Cacheable Containers (Render a container to memory and move with DMA)
  6. etc.

Can you send your project to me? I'd love to check it out in order to help you. I was responding to the fact that you were wondering why the read-only files were getting overridden and that _that_ might be a bug (which it isn't).

Again, don't apologize! If you're having issues that's a serious thing, no matter what it is - And is some kind of input for us to improve.

/Martin

That sounds terrible @Martin KJELDSEN​  - but glad to hear that that the situation will be rectified. Those features sound fantastic and I really look forward to seeing the new release.

Definitely no concern with the read-only files getting overwritten. I think that I can provide my project files for you to examine. What is the best way to send that to you?

Best regards,

Mathew

Hi @Mathew Grabau​,

Just attach it to this post - Clean up generated/ and build/ folders first and it should be small enough.

/Martin

@Martin KJELDSEN​ is it possible to email or some other method of transferring the project?

Thanks,

Mathew