Creating an Event
 
 
 

You can use a wizard to generate the code for a self-installing plug-in that contains a custom event. In addition to generating the skeleton code for the plug-in and the event, the wizard can also generate the code required to add the event to a menu.

To create a self-installing event

  1. Click FilePlug-ins to open the Plug-in Manager.

    Tip In the Tools Development Environment layout, click the Plug-ins tab to switch to the Plug-in Manager view.

  2. Do one of the following:

    • To create the event in the User location, click FileNewEvent.

    • To create the event in a different location (such as a workgroup or an Add-on directory), expand the location in the Plug-in Tree, right-click the Plugins folder and click NewEvent.

    The custom event wizard appears.

  3. In the Name box, type a name for the plug-in.

  4. In the File name box, type a valid file name.

  5. In the Script Language list, click the language you want to generate.

  6. On the Event Definition tab, select the check boxes for the events you want to handle.

    The wizard generates an OnEvent callback for each event you select. The User Event Name is used to name the callback function. For example, the default name for an OnEvent callback for an siOnSelectionChange event is "siOnSelectionChangeEvent_OnEvent".

    The first character in the user event name should be a letter. Subsequent characters can be letters, numbers, or underscore (_) characters.

  7. Click Generate Code.