Showing results for 
Search instead for 
Did you mean: 

problem with void *callbackdata parameter

problem with void *callbackdata parameter

I'm trying to use the callback data parameter.
first I use the SetPanelAttribute to give a value to the callbackdata.
after that, as I understood, whenever a callback is called (from the same), this parameter should be equel to the value I set.
but wht I get is NULL.
(if I call the getPanelAttribute from the callback function, I get the value I assighned).

so what am I doing wrong??

I added a small project I did to test that...

0 Kudos
Message 1 of 2

Re: problem with void *callbackdata parameter

You are setting the callback data for the panel, but the callback you are checking it in is actually a control callback. If you setup a callback function for the panel, you will indeed see the callback data. Each control on the panel has a unique value for callback data (which is useful for distinguishing between controls beyond simply the control ID). If you use SetCtrlAttribute to set the callback data for the test button (PANEL_TEST), you will see that value reflected in the callbackData parameter.


Message 2 of 2