Feature Peek 2011: PrimalForms 2011 – Creating multiple event handlers at once

This month, we are looking at PrimalForms 2011 and how to add event handlers to form controls. After evaluating PrimalForms 2009 and user feedback, we decided to improve the process of adding event handlers in PrimalForms 2011. In PrimalForms 2009, you can create the default event by double clicking on the control or by using the “Edit Default Event” context menu option. But if you want to create a handler for a different event, you have to go to the Property Pane then click on the events button and then search for the event you wish to add. PrimalForms 2011 streamlines this process, thus making it faster and easier to add event handlers.

In PrimalForms 2011 users have the ability to add any event handler by using the “Add Events” context menu option in the Designer:

Add Events Menu Option

(Fig 1: Use the “Add Events” context menu option to add event handlers to any control.)

In addition, PrimalForms 2011 offers the option to create multiple event handlers at once. To facilitate this, the application displays a list of available events in the Add Events Dialog. By  simply checking the corresponding events in the dialog, a user can create multiple event handlers at one time.

Add Events Dialog

(Fig 2: Add Event Dialog – Displays a list of available events. Hover the cursor over the event to display help information.)

Once the Create Button is clicked, the application will automatically generate a new event block for each of the checked events.

Created Events

(Fig 3: The generated event handler script blocks)

 

After the event handlers are added to a control, a user can quickly edit them by using the Designer’s  “Go to Event” context menu option.

GoToEvent

(Fig 4: Use the Go To Event option to edit a specific control’s event handler in the script editor.)

As demonstrated, the event handler creation process can now be handled directly in the Designer without having to access the Property Pane.