Consultor Eletrônico



Kbase P23615: Application has both character and graphical interfaces, how
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/04/2003
Status: Unverified

FACT(s) (Environment):

Progress 9.x

SYMPTOM(s):

Application has both character and graphical interfaces

Has array field in database that is updated in character mode via UPDATE statement so all elements of the array field are displayed on the screen in a kind of editor like look and feel

In graphical mode the elements of the array field are concatenated together and displayed in an editor widget

In graphical mode, cannot split data out into separate elements of the array field like it can be done in character mode

CAUSE:

This is caused by the fact that in character mode the UPDATE statement is actually displaying each element of the array on a separate line so whatever it typed is stored right back into the appropriate array elements.

When using the editor widget in graphical mode, you must manually concatenate the data together then split it apart when storing it back into the elements of the array field. This can be problematic because the editor widget is usually using a proportional font so you cannot guarantee that what the user visual sees is how the data will be stored back into the elements of the array field.

FIX:

The easiest way to resolve this is to change the font of the editor widget so that (1) it uses a fixed space font, (2) the height and width of the editor widget are sized to exactly match the number of array elements and the width of each element and (3) write code to handle the fact that it is possible to hit the return key more times than you have elements in the array to store.