Difference between revisions of "Method make delegate"

From Ribbon Commander Documentation
Jump to: navigation, search
(Remarks)
(Parameters)
Line 3: Line 3:
  
 
== Parameters ==
 
== Parameters ==
 +
=== Generic Form ===
 
{{FuncTableBegin}}
 
{{FuncTableBegin}}
 
{{FuncTableEntry | name=methodName | type=string | value=''[none]'' | desc=The name of the target callback function}}
 
{{FuncTableEntry | name=methodName | type=string | value=''[none]'' | desc=The name of the target callback function}}
 +
{{FuncTableEntry | name=return | type=[[rxDelegate]] | value=''[none]'' | desc=The newly created rxDelegate}}
 +
{{FuncTableEnd}}
 +
 +
=== .NET Delegate Override ===
 +
{{FuncTableBegin}}
 +
{{FuncTableEntry | name=callbackDelegate | type=Delegate | value=''[none]'' | desc=An instance of a .NET delegate used to dispatch the callback}}
 
{{FuncTableEntry | name=return | type=[[rxDelegate]] | value=''[none]'' | desc=The newly created rxDelegate}}
 
{{FuncTableEntry | name=return | type=[[rxDelegate]] | value=''[none]'' | desc=The newly created rxDelegate}}
 
{{FuncTableEnd}}
 
{{FuncTableEnd}}

Revision as of 17:31, 14 March 2013

Description

Creates a new rxDelegate object associated to a callback function and owned by the rxCustomUI instance.

Parameters

Generic Form

Parameter Name
Parameter Type
Default Value
Description
methodName string [none] The name of the target callback function
return rxDelegate [none] The newly created rxDelegate

.NET Delegate Override

Parameter Name
Parameter Type
Default Value
Description
callbackDelegate Delegate [none] An instance of a .NET delegate used to dispatch the callback
return rxDelegate [none] The newly created rxDelegate

Remarks

  1. (VBA-specific) If the rxCustomUI object has global dispatch scope, the target function needs to be a global member of a standard VBA module
  2. (VBA-specific) If the rxCustomUI object has local dispatch scope, the target function needs to be a public member of the VBA class which is used to instantiate the dispatch object (see #Examples)

Examples

VBA

  1.  

C#

  1.  

VB.NET

  1.  

C++

  1.