Click or drag to resize

BasicNoUIObjCreateHandlers Method

Create a collection of Handler objects.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
public Handlers? CreateHandlers(
	string prefix,
	Object eventObj
)

Parameters

prefix  String
All the handlers have this prefix prepended to the names of the methods in eventObj's type.
eventObj  Object
Use this type as the source of the method descriptions used for the handlers. (Subs or functions with '_' in the name are ignored.)

Return Value

Handlers
A Handlers collection.

Implements

IBasicNoUICreateHandlers(String, Object)
Remarks

2025-01-24: This method does not do anything at this time.

The IDE shows the Handlers in the object/proc drop down lists.

Use "modulepath|prefix" to create module specific Handlers. If modulepath is a null string, FileName is used. (The string "|..." is the same as prefixing the string with FileName.) An individual Handler in the collection can be accessed using the normal collection index operator.

If prefix begins with "{type}", where type is the name of the language extension type, create handlers for the type's source interface. For example:

C#
{Word.Application}app_
If prefix has multiple lines (separated by carriage-return line-feed), create handlers for each line's prototype. For example:
C#
Thing_
Changed
Changing(Cancel As Boolean)

This method must be called BEFORE the target code is loaded.

Macro/Module Paths

Macro/module paths are typically file paths. However, it is sometimes useful to work with macros/modules that are not stored as files. A macro/module path is of the form:

C#
[*[*]]path[*]
Part Description
'*' Paths that being with '*' are non-file system macro/modules. The application provides the methods for reading and writing these files. Paths that begin and end with '*' are hidden from the IDE. User's can't step into or otherwise inspect the contents.
'**' Paths that begin with '**' are non-file system modules. The application provides the methods for reading and writing these files. Running an event-driven module loads it using LoadModule.
path This is the identity of the macro/module.

Example
Create a collection of handlers:
Private Handlers handlers;

private void Form1_Load(object sender, System.EventArgs e)
{
    handlers = BasicIdeCtl1.CreateHandlers("App_", appEvents);
}

private void Form1_Closed(object sender, System.Windows.Forms.FormClosedEventArgs e)
{
    if (handlers != null)
        handlers.Dispose();
}
See Also