onVariableNew
Variable creation handler
This example demonstrates how the onVariableNew callback
persists a newly created variable within the host application. Once the variable has been successfully stored, the result is returned to the widget through the
onResponse
callback.
Variable creation handler
onVariableNew: (variable: DIQ_Variable, onResponse: (result: DIQ_Result) => void) => {
// Save the variable to the application's database
database.saveVariable(variable);
// Notify the widget that the operation completed successfully
onResponse({
success: true
});
};