enterInField

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
enterInField
Associationsfield
Summary

Sent to the field with the current selection when the user presses the Enter key.

Introduced1.0
OSmac, windows, linux
Platformsdesktop, server
Example
on enterInField -- add up the lines in the current field
  put sum(replaceText(target,return,comma)) into field "Sum"
end enterInField
RelatedKeyword: field, selection
Property: default, allowKeyInField
Message: keyDown, returnInField, enterKey
Glossary: handler, pass, message, message path, object
Control Structure: pass
Description

Handle the enterInField message when you want to perform an action when the user presses Enter in a field.

The Enter key is usually located on the numeric keypad. It is a different key from the Return key (confusingly labeled "Enter" on some keyboards), which is usually located above the right-hand Shift key.

If the enterInField handler does not pass the message or send it to a further object in the message path, the keypress has no effect. Passing the message allows the keypress to have its normal effect.

If there is no selection or insertion point in any field and the user presses Enter, the enterKey message is sent instead of enterInField.

Tagsui