Technical Tips

Frequently Asked Questions

Attribute Method modifications

Abort Data Entry

Purpose

Quit any further data entry.

Procedure

Under certain conditions when an exit is required from an attribute method, adding this GOSUB and then issuing a RETURN will cause the cursor to proceed to the next sequential object.

                      PROCEED.IMMEDIATELY.TO.NEXT.OBJ

Refresh Any Attribute Being Displayed

Purpose

To refresh any attribute that was previously displayed.

Procedure

For example, entering data in one value may affect the setting of another attribute.  All that is required to refresh the display of data is to place the name of the attribute in the variable name “refresh.attr.name” and place the value in the variable name “data.value”.

    refresh.attr.name = “GENDER”

            data.value = M”

            GOSUB REFRESH.DATA.VALUE

Refresh Objects

Purpose

To refresh the display of a Data Object, a Text or Label Object, or a MultiValue Group Object. Clearing of an Object is also provided.

Procedure

Depending upon the type of object needing to be refreshed, the following procedures provide the correct code to use. See below.

Refresh an Existing Data Object on the Form

Procedure

A Data Object is an object used to enter data. When it is defined, an attribute from the file is associated with the object.

data.value = value to be displayed

cur.value = data.value

refresh.attr.name = “name of attribute to refresh”

GOSUB REFRESH.DATA.VALUE

 Clear a Data Object on the Form

refresh.attr.name = “name of attribute used to create object”

GOSUB CLEAR.DATA.OBJ

Refreshing an Existing Label on the Form

Purpose

Allow the refresh of an existing label on a form.

Procedure

A Label Object is an object used to place text upon the form.  If the programmer wants to change the value in the label with a new value, the following should be used:

1)    View the form with the Visual Pick Design Window.

2)    Right click on the Label Object using the mouse.

3)    Select the Data Edit button from the Methods & Properties window.

4)    Obtain the Object Number from the display data box (e.g., 12).

5)    To change the label display for object 12, the following code is required:

refresh.obj.no = 12

refresh.obj.data = “data to be displayed”

GOSUB REFRESH.OBJ

 

6)    If the version of Visual e does not have the label REFRESH.OBJ, then the following code should be added to the

       TAD.STD.CD.DEF file in record DISPLAY.DATA.VALUE:

 

*::::::::::::::::

REFRESH.TEXT.OBJ:    ;*018

*::::::::::::::::

* refresh.obj.no   This is the actual object number assigned in the

*                  OBJ.PROPERTIES file for this object

* refresh.data     Contains the text to be refreshed.

LOCATE refresh.obj.no IN OP.OBJ.NO.TABLE<1> SETTING VMC ELSE

.WARNING.TITLE  = "Program Error"

.WARNING.PROMPT = "Can't find obj ':refresh.obj.no:"' in OBJ.PROPERTIES.REC"

.GOSUB DISPLAY.WARNING

.RETURN

.!!!!!!

END

OP.OBJECT.TITLE.TABLE<1,VMC> = refresh.data

CALL DELETE.OBJECT(Nw, refresh.obj.no)

GOSUB CREATE.OBJECT

RETURN

!!!!!!

Set Focus on New Object

                 Purpose

To change the focus to another object programmatically.  This is an alternative to the resequencing option in the Window Design program. 

          Procedure

To set the focus on an object other than the next sequential object, use the following code: 

new.focus.attr.name = “name of attribute to set focus on”

GOSUB SET.FOCUS.TO.NEXT.OBJ