One example usescase would be that your control extension has a function that starts a calculation that might take a while an in your code you do not require the result immediately but you like to get a notification with the result.
e.g:
Code: Select all
//button clicked event
{
.....
registerResultCallBack("resultCB"); //function in your control extension to register the callback function that should be called
startCalculation(); //function in your control extension that starts the calculation
.....
}
resultCB(int value) //function that is called from your control extension as soon as the calculation has finished
{
txt1.text = value;
}