And actually yes, this method provide a compile time verification of the callback signature, if you implement a callback with the wrong signature, it will not compile at the "SetCallback" as the second argument is a pointer to a funcdef. It would produce this kind of error: (example taken for my script sorry if names are not very relevant)
Compiling BPE MainMenuForm.bhass (3, 5): INFO: Compiling CMainMenuForm::CMainMenuForm() MainMenuForm.bhass (6, 27): ERROR: No matching signatures to 'CButtonEventHandler::SetCallback(CMainMenuForm&, OnChallengesClick@const)' MainMenuForm.bhass (6, 27): INFO: Candidates are: MainMenuForm.bhass (6, 27): INFO: void CButtonEventHandler::SetCallback(IEventHandler@, ButtonEvent@)(just added an int parameter to the callback method)
So even if the error is not very clear with current implementation, it is triggered when the callback signature is incorrect at compile time.
I didn't think of the CScriptHandle that would have been cleaner indeed. But now the product has been released so it may be for the next one .