cancel
Showing results for 
Search instead for 
Did you mean: 

File MainViewBase.hpp not update.

CRobe.1
Associate II

Hi I need help, I'm trying to learn your development ecosystem and I'm testing the Designer.

I was modifying an existing UI project that of the clock making the modification to create a second screen to make the modification settings of the clock. I quickly created the necessary keys and two text fields to be able to change the clock time.

Just to facilitate understanding, I attach the images of the first and second screens.

0693W000000XNhiQAG.png0693W000000XNiMQAW.png

The problem is that I am unable to implement the various functions described in the tutorial that I report: https://support.touchgfx.com/docs/tutorials/tutorial-02, logically changing the names of the variables and anything else.

My problem is that while creating the interactions and setting new virtual function calls, I don't find them in the generated MainViewBase.hpp file as described in the tutorial.

I will certainly make some mistakes .......

0693W000000XNj5QAG.png

/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef MAINVIEWBASE_HPP
#define MAINVIEWBASE_HPP
 
#include <gui/common/FrontendApplication.hpp>
#include <mvp/View.hpp>
#include <gui/main_screen/mainPresenter.hpp>
#include <touchgfx/widgets/TiledImage.hpp>
#include <touchgfx/containers/clock/DigitalClock.hpp>
#include <touchgfx/containers/clock/AnalogClock.hpp>
#include <touchgfx/widgets/Button.hpp>
 
class mainViewBase : public touchgfx::View<mainPresenter>
{
public:
    mainViewBase();
    virtual ~mainViewBase() {}
    virtual void setupScreen();
 
protected:
    FrontendApplication& application() {
        return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
    }
 
    /*
     * Member Declarations
     */
    touchgfx::TiledImage background;
    touchgfx::DigitalClock digitalClock;
    touchgfx::AnalogClock analogClock;
    touchgfx::Button button1;
 
private:
 
    /*
     * Callback Declarations
     */
    touchgfx::Callback<mainViewBase, const touchgfx::AbstractButton&> buttonCallback;
 
    /*
     * Callback Handler Declarations
     */
    void buttonCallbackHandler(const touchgfx::AbstractButton& src);
 
};
 
#endif // MAINVIEWBASE_HPP

Another thing there is some guide on TouchGfx Deisigner that explains well and in depth the logic of the various Generated folders ??

Thanks

Roberto

6 REPLIES 6
Alexandre RENOUX
Principal

Hello,

I know it sounds silly but did you click on generated code ?

Because it is indeed very abnormal if you did and you cannot find the virtual functions prototype in the .hpp file.

As far as I know we do not have an in depth explanation of the different folders.

In generated/ you have the files generated by Designer

In gui/ you have the files that you can modify or even add new ones

In assets, you have the assets like texts, pictures, fonts

In build/ you have the object files that are generated when you build your project. More importantly, there's the simulator.exe or the binary when you click on Run Target)

In touchgfx/ you will find the framework in itself

/Alexandre

CRobe.1
Associate II

Thanks Alexandre for the reply,

sure I did GENERATE CODE, I even tried to delete the MainViewBase.hpp file in the directory C: \ TouchGFXProjects \ Test2 \ TouchGFX \ generated \ gui_generated \ include \ gui_generated \ and doing GENERATE CODE again the Designer creates me a new file but all I can't find interactions and setting new virtual function calls.

I can't understand what the problem is.

Roby

Alexandre RENOUX
Principal

Could you start creating an entire new project ?

Add a button to the GUI and create a interaction that calls a virtual function when you click the button. Generate the corresponding code.

Tell me if this generates the correct virtual function prototype in the Screen1ViewBase.hpp.

You are using TouchGFX Designer 4.13.0 right ?

/Alexandre

CRobe.1
Associate II

Thanks Alexandre for the reply,

I did as you said I created a call called ButtonCallPush and now generating the code I find it in the file.

So it works on the new file but not on the old one, I use version 4.13.0 exactly.

The file could be damaged then ???

Roby

Alexandre RENOUX
Principal

Ok then try to re-import the UI with clock and add one interaction and a button as well and see if you still have the same problem.

This is something that never happened to me so far.

If the bug persists, can you please write all the steps you did so that we can check if it is reproducible on our side.

Thank you,

/Alexandre

CRobe.1
Associate II

Hi Alexandre,

I confirm that everything works now I try to do other tests .....

Thanks