List of all callback defined by PythonMkKernel
The callback have to be a Python proc or method …
Read more about how to define a service-callback in theLink .
Example about the delete-callback-setup from the RPC server example/py/LibSq3LiteRpcServer.py
ServerSetup : The DeleteCallback is usually installed in the Setup-Callback but only once.
if self.ConfigGetIsParent(): # call “ObjectDeleteCall” ONLY when deleting an instance whose class name matches the regular expression “^Sq3” LibSq3LiteRpcServer.DeleteCallbackSetup("LibSq3LiteRpcServer",self.ObjectDeleteCall,"^Sq3")
The DeleteCallback is called before the deletion. In the RPC example, the RPC client is informed about the impending deletion.
def ObjectDeleteCall(self,obj): self.Send("E","%DEL:CCIH",self.ConfigGetName(),obj.ToNameOfType(),obj.HandleGetOfType(),obj.HandleGet())
ServerCleanup : If the RPC server is deleted, the DeleteCallback is no longer needed and is therefore also deleted.
if self.ConfigGetIsParent(): LibSq3LiteRpcServer.DeleteCallbackCleanup("LibSq3LiteRpcServer")