dongju.jeong Posted March 5, 2019 Share Posted March 5, 2019 when Callback type is the CALLBACK_PARAMETER_CHANGED, Is callbackbase2 only possible? if callbackbase1 is possible, When is the callback function actually called? (property have multiple parameters and When I change multiple parameters) ex) in some class update() property->getParameterPtr("my_param1")->setValue(1); //callback function is called? property->getParameterPtr("my_param2")->setValue(2); property->getParameterPtr("my_param3")->setValue(3); ... Will the callback function run in another space after this code block is finished? Link to comment
alexander Posted March 5, 2019 Share Posted March 5, 2019 Hi dongju.jeong, Is callbackbase2 only possible? Yes, it is. The first argument is a PropertyPtr, the second is a "parameter id". Will the callback function run in another space after this code block is finished? Callback will run in the main thread right after setValue(1) line. Best regards, Alexander 1 Link to comment
dongju.jeong Posted March 5, 2019 Author Share Posted March 5, 2019 then.. what do I do when I try to call a one callback function by considering all the parameter changes that property has at once? Link to comment
alexander Posted March 5, 2019 Share Posted March 5, 2019 For example, you can call your own callback function in your code (don't use Property::addCallback() in this case): property->getParameterPtr("my_param1")->setValue(1); property->getParameterPtr("my_param2")->setValue(2); property->getParameterPtr("my_param3")->setValue(3); on_parameter_changed(property); // something like this Link to comment
Recommended Posts