Error getting tags :
error 404Error getting tags :
error 404 enterInField | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
enterInField
Basics
Expander triangle
Type
Message
Syntax
enterInField
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Sent to the field with the current selection when the user presses the Enter key.
Examples

on enterInField -- add up the lines in the current field
put sum(replaceText(target,return,comma)) into field "Sum"
end enterInField

Additional Comments
Expander triangle

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

Comments:

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.

User Comments
Expander triangle
User thumbnail
Peter Brigham
StarStarStarStarStar
Aug 1, 2009
The last sentence should be amended slightly. If there is no selection or insertion point in any field, but a field has the focus (for instance, its traversalon is might be true true but the field is locked), then the enterinfield message is sent to the field, not the enterkey.