Showing results for 
Search instead for 
Did you mean: 

Function of screen called from custom widget (keyboard)

Associate III


I've followed the example given in the link below in order to call the screen from the container. It works perfectly when I implement it in one of my custom containers.

The problem I'm facing now is that I'm trying to do the same with the keyboard example given by touchgfx (custom widget now and no more custom container) (when I attain the end of my buffer, I want to show a button in my screen (and hide it if the use hits backspace)). Added a few functions of my own too.

I have this error:

 gui/src/containers/CustomKeyboard.cpp: In member function 'void CustomKeyboard::keyboard_complete(bool)':
        gui/src/containers/CustomKeyboard.cpp:185:9: error: invalid use of incomplete type 'class ConnectChargerView'
        In file included from gui/src/containers/CustomKeyboard.cpp:1:0:
        gui/include/gui/containers/CustomKeyboard.hpp:16:7: note: forward declaration of 'class ConnectChargerView'
         class ConnectChargerView;

When I add the include of my screen into the CustomKeyboard.hpp (include <gui/connectcharger_screen/ConnectChargerView.hpp>)

I have this error:

 In file included from gui/include/gui/containers/CustomKeyboard.hpp:12:0,
                         from gui/src/containers/CustomKeyboard.cpp:1:
        gui/include/gui/connectcharger_screen/ConnectChargerView.hpp:36:5: error: 'CustomKeyboard' does not name a type
             CustomKeyboard keyboard;

My screen contains a function for the button:

void ConnectChargerView::ECCD_keyboard_complete(bool visible)

And a protected variable keyboard:

CustomKeyboard keyboard;

I'm attaching my keyboard.cpp and .hpp

Is there something wrong I'm doing or that I didn't understand about custom widgets?

Thanks in advance for your help,