let's make an example together - I assume you are working with STM32F769 Discovery board.
1. Open the original 'DeviceIntegration' example that you will find in the /Example subdirectory of the Build Environment for the STM32F769 Discovery board.
2. Generate code and compile / link / flash the application - just to see that everything is working.
3. Within Embedded Wizard Studio, open the Device Class and add a new property from the Gallery folder 'Device' into the class and rename it to 'HakanVariable':
4. Open the class Application::Application and add a Text view from the Gallery folder 'Views' into the application and choose a suitable font. Add a simple touch handler from the Gallery folder 'EventHandlers' and place it over the text item:
5. Add a slot method from the Gallery folder 'Chora' into the application class and rename it to 'onTouch'.
6. Set the property 'OnPress' of the simple touch handler to 'onTouch' in order to call the slot method 'onTouch' every time the user has pressed the touch area.
7. Open the slot method 'onTouch' within the Editor and add the following code:
Device.HakanVariable = Device.HakanVariable + 1;
Text.String = string( Device.HakanVariable );
Now, when you start the application in the Prototpyer, everytime you touch on the text item, the counter is incremented and updated.
The same result is also on the target! :-)