Removing an Event Handler

You can use options within the Design Tool to detach event handlers from Host Integrator components. If you also want to remove associated files, additional steps are required.

Detaching an event handler

  1. Click Events > Attach to open the Attach Event Handlers dialog box.
  2. Navigate to the object that has the event handler you want to detach.
  3. In the right panel, the Event Handlers column lists the event handler attached to an object. This option is available whether you view event handlers sorted by Structure or by Type.
  4. When you click the event handler, a list is available. Select <None> from the list.
  5. Click OK.

Removing an event handler file

Before you delete an event handler, check whether any other component is using it. You can review components that may be still be using the event handler from the Type tab on the Attach Event Handler dialog box.

If you delete the .java file (Java) or the .cs file (.NET) when an event handler is still attached to a component, the event handler will be displayed in red in the Attach Event Handlers dialog box, and you will be warned when you try to save the model that it cannot be deployed in its current state.

  1. Java:The .java file associated with an event handler is located in <your_model_folder>\<model name>\scripts\src. Delete the .java file for the event handler.

    .NET:The .NET C# (.cs) source file associated with an event handler is located in <your_model_folder>\<model name>\scripts\src. Delete the .cs file for the event handler.

  2. In the Design tool, click Events > Rebuild to rebuild the model JAR (Java) or assembly (.NET) file.

 

Related Topics
Bullet Attaching an event handler