Release 10.1A: OpenEdge Development:
Debugging and Troubleshooting

> ## Dataview dialog box

> The Dataview dialog box lets you examine and modify data for variables and arrays, attributes of objects, and field data for buffer objects. You can add a watch for any entity that appears in the dialog box.

> Access this dialog box by choosing one of the following:

> - The Dataview option on the Debug menu, or press CTRL+D.

> - The Dataview option on the context (right-click) menu from the watches or variables pane.

> - A 4GL system handle on the Data menu.

> If you selected an object before choosing the Dataview option, the object appears automatically in the Dataview dialog box. Otherwise, you can enter an object name in the View field or select an object you viewed previously from the drop-down list, and choose the View button.

> The Dataview dialog box has four tabs:

> - Attributes tab — Lets you examine the attributes of a selected object or handle.

> - Fields tab — Lets you examine fields associated with a selected buffer.

> - Array tab — Lets you examine the elements of an array.

> - Value tab — Lets you view the value of a variable, attribute or field.

> ##### Attributes tab

> The Attributes tab lists the attributes associated with the selected object. Figure 3–5 shows the Attributes tab.

> Figure 3–5: Dataview dialog box with Attributes tab

> ##### Fields tab

> The Fields tab lists the fields associated with the selected object. Figure 3–6 shows the Fields tab.

> Figure 3–6: Dataview dialog box with Fields tab

> | To view buffer details:

> 1. Select the buffer in the Variable pane.

> 2. Right-click and choose Dataview.

> 3. Select the Field tab to view all field values in the buffer. You can view buffer details and add a watch.

> Double-clicking on a cell in the value column makes the value editable. You can modify the value of variables, attributes (writable only) or fields by entering a different value and pressing the ENTER key. Pressing the ESC key when editing a value restores the current value and cancels the editing operation.

> You can modify a field value in a buffer when the buffer contains a record; however, the modified value is not immediately stored in the database. To store the modified value in the database, you must execute the appropriate statement in your 4GL code (such as `RELEASE` `record`).

> Some attributes are handles to other objects (for example, the `PARENT` attribute of a object is the handle to the parent of that object). In this case, you can “walk the object tree” by selecting the attribute and choosing the View button. The new attribute appears in the View field (for example, if you are viewing `FILL-IN-1` and select the `PARENT` attribute, the new attribute appears as `FILL-IN-1:PARENT`). If the new attribute is a valid object handle, choosing the View button refreshes the data view for that attribute. You can access the original object by selecting it from the drop-down list and choosing the View button.

> You can chain object references. For example, the following object reference displays the information for a window containing a fill-in (assuming the fill-in is three levels from the window):

>     FILL-IN-1:PARENT:PARENT:PARENT

> ##### Array tab

> The Array tab displays the elements of an array (a variable, parameter, or field defined with the `EXTENT` option) and their values. To view the elements of an array, right-click on an array in the variables pane and choose Dataview from the pop-up menu. The Dataview dialog box appears with the Array tab populated with the elements of the selected array, as shown in Figure 3–7.

> Figure 3–7: Array elements in the Dataview Array tab

> You also can view the elements of an array field in a buffer. When viewing the buffer's fields in the Dataview dialog box, select the array field, choose the View button, and then choose the Array tab to view the field's elements.

> The array viewer can show a limited amount of data, approximately 30KB. If the Array tab cannot show every element of an array at once, it displays “…” as the value of the last element. Select this element and choose the View button to refresh the Array tab. The array viewer then shows the next 30KB of the array, beginning at the selected element.

> You can modify the elements of an array. Double-click on a cell containing the value to make it editable. Enter a different value and press the ENTER key. Pressing the ESC key when editing a value restores the current value and cancels the editing operation.

> ##### Value tab

> The Value tab enables you to view the value of a discrete entity, such as a variable, attribute, field or handle, without adding a watch. Figure 3–8 shows the Value tab.

> Figure 3–8: Dataview dialog box with Value tab

> Note: You access some system handle dataviews from the Data menu. These include the `LOG-MANAGER`, `SESSION`, and `ERROR-STATUS` system handles.

> | To view an entity:

> 1. Enter an entity name in the edit box.

> 2. Choose the View button. The entity’s value appears in the Value tab.

> You can modify the value of the entity. Double-click on the value to make it editable. Enter a different value and press the ENTER key. Pressing the ESC key when editing a value restores the current value and cancels the editing operation.

> ##### Distinguishing ProDataSet methods from attributes

> The Debugger displays references to the objects contained in a ProDataSet, in addition to the attributes of the ProDataSet itself. In the 4GL, these objects are accessible via ProDataSet methods. The Debugger, however, cannot execute methods; therefore, in the Dataview dialog box, these references appear as special entries in mixed case (upper and lower), to differentiate them from the attributes, which appear in uppercase, as shown in Figure 3–9.

> Figure 3–9: ProDataSet methods and attributes in the Dataview dialog box

> You can select one of the `MemberBuffer` lines and refresh the Dataview dialog box to view the buffer's attributes. The Debugger takes a similar approach to the other methods that retrieve ProDataSet-related information (`GET-CHILD-RELATION`, `GET-SOURCE-BUFFER`, and so on), as follows:

> Object | Method | Dataview object name
> --- | --- | ---
>     BUFFER
>     GET-CHILD-RELATION()
>     ChildDataRelation
>     DATA-SOURCE
>     GET-SOURCE-BUFFER()
>     SourceBuffer
>     DATASET
>     GET-BUFFER-HANDLE()
>     MemberBuffer
>     DATASET
>     GET-RELATION()
>     DataRelation
>     DATASET
>     GET-TOP-BUFFER()
>     TopBuffer

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095