ActionKey (Screen function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (re-<var>)
m (1 revision)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:Screen:ActionKey subtitle}}
{{Template:Screen:ActionKey subtitle}}
The <var>ActionKey</var> read-only property returns an <var>[[#ActionKey enumeration|ActionKey]]</var>  enumeration which is the keyboard key that activated the last screen read.
The <var>ActionKey</var> [[Classes and Objects#readWrite|readOnly]] property returns an <var>[[Screen classes#ActionKey enumeration|ActionKey]]</var>  enumeration which is the keyboard key that activated the last screen read.


==Syntax==
==Syntax==
Line 6: Line 6:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th><var>%key</var></th>
<tr><th>%key</th>
<td>A declared <var>ActionKey</var> enumeration (see below). </td></tr>
<td>A declared <var>ActionKey</var> enumeration value.</td></tr>
<tr><th><var>screen</var></th>
<tr><th>screen</th>
<td>A reference to an instance of a <var>Screen</var> object.</td></tr>
<td>A reference to an instance of a <var>Screen</var> object.</td></tr>
</table>
</table>
===ActionKey enumeration===
Valid values of this enumeration are <code>Enter</code> and <code>Pf1</code>, <code>Pf2</code>, and so on through <code>Pf24</code>. The value that is set initially is <code>Enter</code>.


==Usage notes==
==Usage notes==
<ul><li>You can use the <var>ActionKey</var> class <var>ToNumber</var> method to convert <var>ActionKey</var> enumeration values to a numeric value: the integer that remains after the key name is stripped of its "PF" prefix. For <var>Enter</var>, the numeric value is 0. These values are useful in a value-testing loop in conjunction with the <var class="product">User Language</var> <var>Jump</var> statement.
<ul><li>The <var>ActionKey</var> enumeration <var>[[Screen classes#ToNumber function|ToNumber]]</var> method provides integer values that you can use in a value-testing loop in conjunction with the <var class="product">User Language</var> <var>Jump</var> statement, as demonstrated in [[Screen object sample code|"Screen object sample code"]].
</ul>
</ul>


==See also==
==See also==
{{Template:Screen:ActionKey footer}}
{{Template:Screen:ActionKey footer}}

Latest revision as of 22:25, 16 November 2012

Return name of key that activated last screen read (Screen class)

The ActionKey readOnly property returns an ActionKey enumeration which is the keyboard key that activated the last screen read.

Syntax

%key = screen:ActionKey

Syntax terms

%key A declared ActionKey enumeration value.
screen A reference to an instance of a Screen object.

Usage notes

  • The ActionKey enumeration ToNumber method provides integer values that you can use in a value-testing loop in conjunction with the User Language Jump statement, as demonstrated in "Screen object sample code".

See also