Why are all event callback parameters declared "const"? how do I alter UI from events?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-23 6:57 AM
For instance "void textAreaClickHandler(const TextAreaWithOneWildcard& area, const ClickEvent& event);"
I would like to alter UI controls from callbacks but "const" seem to tell me that that's against some big picture idea of TGFX? What concept am I missing? I've looked at documentation and did not see anything very focused on event paradigm.
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-23 7:05 AM
Simply this & is addr to objects and need protect to overwrite. But you can call methods for change this objects properties free...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-23 7:13 AM
C:/Work/T4sest/est1/TouchGFX/gui/src/screen1_screen/Screen1View.cpp:60:21: error: passing 'const touchgfx::TextAreaWithOneWildcard' as 'this' argument discards qualifiers [-fpermissive]
60 | b.setAlpha(1);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-23 7:19 AM
Show code
...
