RFInput Method

This member of RFIO Object is supported on iOS, Windows Mobile, Windows CE, Palm, and DOS.

The RFInput method returns user input from an RF device used over a wireless network.

VB

pszInput = object.RFInput (pszDefault, nLength, nColumn, nRow, pszBarCfg, nKeyMode, nInputMode)

VC++

HRESULT hr = object->RFInput(LPCTSTR pszDefault, short nLength, short nColumn, short nRow, LPCTSTR pszBarCfg, short nKeyMode, short nInputMode, Cstring *pszInput);

Return Value

pszInput

The returned input value variable. If this method returns an empty string an error may have occurred. Use the RFGetLastError method to return the generated error code.

Parameters

pszDefault

Default values to appear in the input prompt (“"). The default value will not be included in the returned input.

nLength

The maximum number of characters that may be entered at the input point by the user before input is automatically returned. This parameter also defines the number of characters that will be displayed at the input point.

nColumn

The on-screen column coordinate in which the input prompt will begin. Columns are numbered from the left starting with column 0.

nRow

The on-screen row coordinate in which the input prompt will begin. Rows are numbered from the top starting with row 0.

pszBarCfg

The file name of the barcode configuration used by the input call. Enter null (“) for this parameter to use the current barcode configuration.

nKeyMode

The current keyboard shift state as represented by a constant (WLNORMALKEYS or WLCAPSLOCK). The possible values for nKeyMode are:

WLNORMALKEYS Caps lock off

WLCAPSLOCK Caps lock on

nInputMode

The current state for input device options as represented by constants. Multiple options may be used by ORing the desired values. For example, to disable the scanner and function keys enter "WLDISABLE_SCAN+WLDISABLE_FKEYS". The possible values for nInputMode are:

WLDISABLE_SCAN Disable the RF device scanner

WLDISABLE_KEY Disable the RF device keypad

WLSUPRESS_ECHO Disable display echo of input

WLNO_RETURN_FILL Input will not be returned until the enter key is pressed, even if the maximum input length has been reached.

WLNO_RETURN_BKSP Input will not be returned if the Backspace key is pressed in the first position of the input prompt.

WLDISABLE_FKEYS Disable function keys

WLFORCE_ENTRY Input will not return unless an actual value has been entered in the input prompt.

WLALPHA_ONLY Accept only alphabetic input

WLNUMERIC_ONLY Accept only numeric input

WLBACKLIGHT Enable the device's display backlight

WLMAXLENGTH RFInput will not accept more characters than defined in the nLength parameter.

WLINCLUDE_DATA RFInput will return both data entered at an input prompt and any additional function key input.

WLSOFT_TRIGGER This input mode will automatically activate the RF device’s scanner when the RFInput function is called.

WLCLR_INPUT_BUFFER Clears the input buffer of any pending data.

WLINGORE_CRLF Includes any carriage returns or line feeds embedded within the returned input string. By default, returned input strings containing these characters are broken into separate input packets.

WLECHO_ASTERISK Echo an asterisk (“*) to RF device screen with each key entered.

WLNO_NONPRINTABLE Suppress non-printable characters. This input mode is used primarily when using foreign character sets.

Remarks

RFInput will return input immediately after either the Enter key is pressed, the maximum input length has been reached, the Backspace key is pressed in the first position, or a function key is pressed. If a function key is pressed, the RFInput will only return the value for the function key pressed, discarding any data entered in the input prompt (use the WLINCLUDE_DATA to return both the data entered in the input prompt and the function key value). It is important to note that if you use WLINCLUDE_DATA, only the data entered in the input prompt will be removed from the input stack on the initial call to RFInput. A subsequent call to either RFInput or GetEvent Method within the same RFIO object will be required to remove the function key from the input stack.

You may limit barcode input types through the use of Barcode Configuration files, please see the RFBarcode Object for more information.

To return a single key, function key combination, or scan input use the GetEvent Method.

Use the TellEvent Method to check for user input without removing the input from the input queue and pausing your application.

Example

' VB Sample Code
Dim wlio As New RFIO
Dim wlTerm As New RFTerminal
Dim PszVerifyInDefault As String
Dim PszVerifyIn As String
pszVerifyInDefault = ""
.
.
.
' Do something to direct the user to enter input. This
' example uses a call to RFPrint.
' Note: This example uses the RFTerminal object to dynamically
' position the screen output.
wlio.RFPrint 0, (wlTerm.TerminalHeight - 1), _
"Verify y/n ? ", WLREVERSE + WLCLREOLN
' position the input field off screen
pszVerifyIn = wlio.RFInput(pszVerifyInDefault, 1, 0, _
wlTerm.TerminalHeight + 2, "", _
WLDISABLESCAN + WLNO_RETURN_BKSP)

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal