New IIPs for Windows

RAMP-NL

New IIPs for Windows


New IIPs have been made available to support Dynamic Naming:

AvMakeFormName

This method is called when a form has yet to be named using Dynamic Naming.

AvMakeControlName

This method is called each time a cell in the Input/Output control grid in Dynamic Naming interface receives the focus. It allows you to standardise the screen’s field names should your application use a certain naming convention.

AvValidateFormName

Validate the name given to a Newlook screen.

AvValidateControlName

Validate the name given to a Newlook screen’s control.

 

Example

You can modify the default behaviour of the Dynamic Naming dialog in the Windows IIP (by default UF_SYSTM).

This example sets the prefix for all newlook controls XXX:

...

* This method is called by the dynamic naming tool to set a default value to give to an unnamed Newlook form.

* Here you can specify a value based on some naming standard to give to all Newlook forms. The default value returned by the ancestor

* is blank.

* To specify your own, comment out or delete the Invoke Method(#COm_Ancestor.avMakeFormName) Formprefix(#FormPrefix) command

* and insert your own logic. Return the value in the output parameter #FormPrefix.

 

Mthroutine Name(avMakeFormName) Options(*REDEFINE)

* Define_Map For(*output) Class(#vf_eltxtm) Name(#FormPrefix) Desc('Prefix to apply to unnamed forms ')

 

Invoke Method(#Com_Ancestor.avMakeFormName) Formprefix(#FormPrefix)

 

Endroutine

 

* This method is called by the dynamic naming tool when the focus is set into a cell in the grid that shows

* all the *controls in the Newlook form that is showing. Here you can specify a value perhaps based on some

* naming standard to give to all defined Newlook controls. The default value returned by the ancestor blank.

* To specify your own, comment out or delete the Invoke Method(#COm_Ancestor.avMakeControlName) Controlprefix(#ControlPrefix) command

* and insert your own logic. Return the value in the output parameter #ControlPrefix.

 

Mthroutine Name(avMakeControlName) Options(*REDEFINE)

* Define_Map For(*output) Class(#vf_elctln) Name(#ControlPrefix) Desc('Prefix to apply to unnamed controls ')

 

* Invoke Method(#COm_Ancestor.avMakeControlName) Controlprefix(#ControlPrefix)

 

set com(#Controlprefix) value(xxx)

 

Endroutine

 

* Use this method to validate the name given to a Form using the Dynamic Naming tool. The default behaviour is to return OK

* except when the form name is equal to the value set in method avMakeFormName:

* If Cond('#FormName = *blanks')

* Set Com(#ReturnCode) Value(ER)

* Set Com(#ErrorMessage) Value(*MTXTVF_UM701_014)

* Else

* Set Com(#ReturnCode) Value(OK)

* Endif

 

Mthroutine Name(avValidateFormName) Options(*REDEFINE)

* Define_Map For(*input) Class(#vf_eltxtm) Name(#FormName) Desc('Form name to be validated')

* Define_Map For(*output) Class(#vf_elretc) Name(#ReturnCode) Desc('OK or ER')

* Define_Map For(*output) Class(#vf_elmsg) Name(#ErrorMessage) Desc('Returned message in case of error')

 

Invoke Method(#COm_Ancestor.avValidateFormName) Formname(#FormName) Returncode(#ReturnCode) Errormessage(#ErrorMessage)

Endroutine

 

* Use this method to validate the name given to a Newlook control using the Dynamic Naming tool. The default behaviour is

* to return OK except when the control name is equal to the value set in method avMakeControlName:

* If Cond('#ControlName = *blanks')

* Set Com(#ReturnCode) Value(ER)

* Set Com(#ErrorMessage) Value(*MTXTVF_UM701_013)

* Else

* Set Com(#ReturnCode) Value(OK)

* Endif

 

Mthroutine Name(avValidateControlNam) Options(*REDEFINE)

* Define_Map For(*input) Class(#vf_elctln) Name(#ControlName) Desc('Control name to be validated')

* Define_Map For(*output) Class(#vf_elretc) Name(#ReturnCode) Desc('OK or ER')

* Define_Map For(*output) Class(#vf_elmsg) Name(#ErrorMessage) Desc('Returned message in case of error')

 

Invoke Method(#COm_Ancestor.avValidateControlNam) Controlname(#ControlName) Returncode(#ReturnCode) Errormessage(#ErrorMessage)

 

Endroutine

...