Previous Topic

Next Topic

Inhoudsopgave

Book Index

Events

The table below shows for each COM scripting component type whether or not the event timing has changed in relation to Isah version 4.0.3 and earlier.

Edit form/ Wizard form

OnEnter

OnExit

OnChange

OnClick

CheckBox

Unchanged

Unchanged

Changed

(Not applicable)

ComboBox

Unchanged

Unchanged

Changed

(Not applicable)

Edit

Unchanged

Unchanged

Changed

(Not applicable)

DateEdit

Unchanged

Unchanged

Changed

(Not applicable)

Label

(Not applicable)

(Not applicable)

(Not applicable)

(Not applicable)

Memo

Unchanged

Unchanged

Changed

(Not applicable)

RadioButtons

Unchanged

Unchanged

Changed

(Not applicable)

Lookup

Unchanged

Unchanged

Changed

(Not applicable)

Image

(Not applicable)

(Not applicable)

(Not applicable)

(Not applicable)

Button

Unchanged

Unchanged

(Not applicable)

Unchanged

CalcEdit

Unchanged

Unchanged

Changed

(Not applicable)

As you can see, the changes only affect the OnChange event. More specifically, the changes are:

No OnChange event when creating EditForm components

When creating the components (initializing), the OnChange event will no longer be triggered if, in addition, the default value is set immediately. In previous releases, the OnChange event was usually triggered. See the following table:

Function

Version 4.0.3 and earlier

Version 4.0.5

AddCheckBox

Change event is triggered if Value = True

Change event is never triggered

AddComboBox

Change event is never triggered

Change event is never triggered

AddEdit

Change event is always triggered

Change event is never triggered

AddDateEdit

Change event is triggered if Value > ""

Change event is never triggered

AddLabel

(Not applicable)

Change event is never triggered

AddMemo

Change event is triggered if Value > ""

Change event is never triggered

AddRadioButtons

Change event is always triggered

Change event is never triggered

AddLookup

Change event is triggered if Value > ""

Change event is never triggered

AddImage

Change event is never triggered

Change event is never triggered

AddButton

Change event is never triggered

Change event is never triggered

AddCalcEdit

Change event is triggered if Value > ""

Change event is never triggered

Example

Sub Main

Set oFrm = Application.IsahForms.CreateEditForm

Set oRb = oFrm.AddRadioButtons("rb1", , , , , "Choice", "1;2;3;4", 3, 2)

.. oRb.ItemIndex = 1

End Sub

The AddRadioButtons() call initializes the items of the radio button group, and sets the ItemIndex to 3 (= 4th item), but in Isah version 4.0.5, this will no longer trigger an OnChange event.

The subsequent line, by which the ItemIndex is changed, WILL cause an OnChange event for the radio group from Isah version 4.0.5 onwards.

Changed time of event handling

In previous versions, the OnChange event was called as soon as the initial values were set during component creation. The OnChange event was not triggered immediately, but only after some time (usually only after ending the current Sub/Function in the script). From this version onwards, the OnChange event is no longer called (refer to the 'No OnChange event when creating EditForm components' section). An OnChange event can now be called by setting the value by means of code. The event will then be triggered immediately, even before the next line of code is executed.

Note: Because for each event type there is only one event handler for all components, not all of the script's components may have been created yet at the time the event is activated. If the event refers to a component that has not yet been created, an error message will appear.