JVCL Help:TJvInspectorTMethodItem.AddMethod@TMethod@string

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Adds an event handler to the list of event handlers.


Pascal

 procedureAddMethod(constMethod: TMethod; constMethodName: string); overload;
procedureAddMethod(constInstance: TObject; MethodAddr: Pointer; constMethodName: string); overload;


Parameters

Parameters Description
const Method: TMethod Method pointer to add. The method pointer provides a Data address (the instance) and a Code address (the address of the handler).
const MethodName: string Name of the method. AddMethod will not try to obtain the method name by calling MethodName on the instance using the provided handler address. You may do that yourself in the call to this method.
const Instance: TObject Instance to which the handler should be added.
MethodAddr: Pointer Address of the handler to add.


Description

AddMethod adds an event handler to the list of event handlers, providing it with a name. Before you can add any method you should first add the instance to which the method belongs, using AddInstance.
There are two overloaded versions of this method. One provides you with a way to add a method pointer directly (a TMethod) while the other provides you with a way to specify the instance and the address of the handler. Both allow to set the name of the handler.


See Also

TJvInspectorTMethodItem.DeleteMethod, TJvInspectorTMethodItem.ClearMethods, TJvInspectorTMethodItem.IndexOfMethod


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page