cancel
Showing results for 
Search instead for 
Did you mean: 

Callbacks between container and view

Priyank
Associate II

Hi, I went through some other discussions discussing a similar problem, but they did not seem to help. 

I have screen one which displays (dynamically) a container. The container has a button on it, which when clicked, changes screens to screen 2. At the same time the container needs to send data to screen 2 (an int). The button is a flex button which I set up from the GUI call a virtual function. 

I would prefer a way where the container is not permanently tied to screen 2, as this container appears on multiple screens and does something similar.

11 REPLIES 11
GaetanGodart
ST Employee

Hello @Priyank ,

 

Did you solve this issue?

I saw that you created a new topic (the new topic ).

If you did, I invite you to select the comment that was the most helpful (if any) as "best answer". :smiling_face_with_smiling_eyes:

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

While studying this how to pass information from Widget/View/Presenter/Model.
I've been struggling with the callbacks.

One of the thing I found was the use of Canvas to allocate memory beforehand for dynamic widget creations.
Check Demo2/HomeAutomationView()/CanvasWidgetRenderer as an example.
(This one is going to he complicated, check the MVPHeader for possible "global" memory.)

Did you figure out a way to have interactions between a customWidget/View back and forth without having to make many callbacks?