Skip to main content
Tty.1
Associate
February 10, 2021
Solved

A reference of type cannot be initialized with a value of type

  • February 10, 2021
  • 3 replies
  • 1614 views

I added "graph clicked trigger" to graph and generated code. In the MainView Base.cpp graph.setClick Action(graphClickCallback) gived this error.

Error[Pe434]: a reference of type "touchgfx::GenericCallback<touchgfx::GraphWrapAndClear<(int16_t)100> const &, touchgfx::ClickEvent const &> &" (not const-qualified) cannot be initialized with a value of type

"touchgfx::Callback<MainViewBase, touchgfx::AbstractDataGraph const &, touchgfx::AbstractDataGraph::GraphClickEvent const &>"

This topic has been closed for replies.
Best answer by Tty.1

I solved error by uncheck ClickListener in MIXINS.

3 replies

Tty.1
Tty.1AuthorBest answer
Associate
February 10, 2021

I solved error by uncheck ClickListener in MIXINS.

Romain DIELEMAN
ST Employee
February 11, 2021

Interesting, what were you trying to do ?

/Romain

Tty.1
Tty.1Author
Associate
February 11, 2021

I was doing Dynamic Graph Widget - TouchGFX on Youtube and I thought I had to add "click listener" to be able to use ClickEvent.hpp