Start a new topic

Multiple Objects to one Callback function

Hello,


Is it possible to get the ID of an object in a callback function?


I have to react on a group of 22 Buttons


The Plan was to send all button callbacks to one function

btn_F01.attachPop(btn_F00_pop, &btn_F01);
btn_F02.attachPop(btn_F00_pop, &btn_F02);
btn_F03.attachPop(btn_F00_pop, &btn_F03);

...


and get the information from the ptr parameter

but I don´t know how.


if I try

int SelectedBtn = btn->getCid();

I get the error:

'class NexButton' has no member named 'getCid'


Thank you


Login or Signup to post a comment