<<

Contents

Search

>>

 

SELAEDIT

 

 

Function

 

 

Syntax:

SELAEDIT(<Fields>,<Field Params>,<Decimal Separator>,<Key> [,[<Macro Before>] [,[<Macro After>] [,<Handle>]]])

 

<Fields>

= <STRING-EXPRESSION>

<Field Params>

= <STRING-EXPRESSION>

<Decimal Separator>

= <STRING-EXPRESSION>

<Key>

= <STRING-VARIABLE>

<Macro Before>

= <MACRONAME>

<Macro After>

= <MACRONAME>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

SELAEDIT edits fields of the current line in SELECTA, which contains fields separated by a separator.

 

<Fields> contains separated by semi-colon the numbers of the SELECTA fields to be edited and in this way also defines the order of field processing.

 

<Field Params> contains separated by semi-colons the field parameters of the fields. For each field number in <Fields> the field parameters must be specified. The field parameters have the following structure:

 

<Field Type>, <Field Length> [,<Post Decimal Positions>, <Zero Display> [,<Grouping Separator>]]

 

Field Type

A (alphanumeric) or N (numeric) or D (date)

Field Length

Length of the field

Post Decimal Positions

Number of post decimal position with <Field Type> = N

With <Field Type> = A this parameter specifies the maximum number of characters that the edit field can hold. If this parameter is <= 0 the value of <Field Length> specifies the maximum number of characters. <Field Length> specifies the length of the edit field on the screen. If <Field Length> is greater than the current length of the field on the screen the field is broadened accordingly.

Zero Display

0: With field value = 0 blanks are displayed.

<> 0: With field value = 0 the zero is displayed.

Grouping Separator

0: No grouping separator is displayed.

<> 0: The grouping separator is displayed.

 

Fields are processed in the same way as masks. With <→|>, <RETURN> and <|←> program control can jump forwards and backwards within the fields. With the keys <↓> and <↑> program control can line-wise scroll forwards and backwards. Every field of <Fields> can be clicked with the mouse. After a field is left the changed field value in entered into the table of SELECTA.

 

The whole field processing is terminated by <Esc> in any field (the changes of the current field are not adopted) or by <RETURN> or by <→|> in the last field. <Key> then contains the last pressed key by which field processing was terminated. Field processing is also terminated by the instruction ENDPROG in the <Macro Before>, <Macro After>, ON <TASTE> MACRO or ON <EREIGNIS> MACRO. <Key> the contains the empty string "".

 

<Macro Before> and <Macro After> are executed before or after the field input, just like with mask fields. In these Macros EBUS_MNR is always = 1. Like with the mask processing EBUS_FNR contains the field sequence which is counted from 1.

 

<Handle> specifies in which window SELECTA is running. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing, SELECTA has to run  in the current window.

 

Note: EBUS_FNR does not contains the numbers of <Fields> but the field sequence.

Example: <Fields> = "2;6;4"

EBUS_FNR = 1, if the SELECTA field No. 2 is edited.

EBUS_FNR = 2 with field No. 6 and = 3 with field No. 4.

 

Note: While the macros are executed the current ON <KEY> Macros and not the ON SELECT(<KEY>) Macros apply!

 

Another value can be assigned to the current field in the ON <KEY> Macro with the help of the variable EBUS_TRANSFER, EBUS_DATA and EBUS_DATA$.

 

In the ON SELECT(RETURN) macro the variable EBUS_SELECT_FIELD contains the number of the column which has been clicked. Therefore it is possible to specify an individual sequence of the fields which shall be edited by SELAEDIT.

 

SELAEDIT returns the following values:

 

0

1

-1

6200

6201

6202

6203

6204

6205

6206

6207

6208

6209

No error. No data changed.

No error. Data have been changed.

SELECTA is not running or has not been found.

SELECTA contains no fields that are separated by a separator.

<Field type> with <Field types> is missing or invalid.

<Field length> with <Field types> is missing or invalid.

<Post decimal positions> with Field types is missing or invalid.

<Field types> are invalid: Comma missing.

<Field types> are invalid: Semi-colon missing.

Field number not available,

<Field length> must be 6 or 8 with date field

<Zero display> missing with <Field types> or invalid

SELAEDIT is already running.

 

Parameter:

Fields

Contains separated by semi-colon the numbers of the fields to be edited.

 

Field Params

Contains separated by semi-colon the field parameters of the fields.

 

Decimal Separator

Defines the decimal point: . or ,

If <Decimal Separator> = "", the standard decimal point applies.

 

Key

Contains the key by which field processing was terminated.

 

Macro Before

Macro before field input

 

Macro After

Macro after field input

 

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

 

Sample:

DIM T$(3)

 

T$(1) = "Smith John;19.03.1954;235,40"

T$(2) = "Meier Josef;23.07.1965;0"

T$(3) = "Becker Susi;12.01.1958;-1235,75"

 

ON SELECT(RETURN) MACRO EDIT

WINDOWPOS(5,10)

H% = SELECTA(T$,"",3,"SELECTA",1,3,";")

...

Macro EDIT:

NO$ = "2;3;1" /* Edit fields 2, 3 and 1

FIELDPARAMS$ = "D,8;N,8,2,1;A,20"

H% = SELAEDIT(NO$,FIELDPARAMS$,",",KEY$)

IF H% <> 0

THEN ERRORMES = "Error" + STR$(H%)

ENDIF

 

See also:

EBUS_SELAEDIT_ABORT

SET_SELAEDIT_VALUE

SELECTA

ENDSELAEDIT

SELEDIT$