Search code examples
user-interfaceopenedgeprogress-4gl

How to see the value of a widget?


This might seem very obvious, but I'm having trouble with the following thing I want to do:

I put a value in a fill-in field, and I want to see this on screen (the field is part of a frame):

ON <some_event> OF <another_widget> IN FRAME <correct_frame_reference>
         ASSIGN fi-Value = -1.
         DISPLAY fi-Value.

As far as I understand, this would do the following:

The ASSIGN moves the value from the screen buffer to the record buffer.
The DISPLAY moves the value from the record buffer to the screen buffer (in other words, the value should be seen on screen).

This works, but the whole frame gets deleted, and I only see the following screen (instead of my entire frame):

enter image description here

What do I need to do in order not to lose the whole window/frame?


Solution

  • The DISPLAY inside your trigger has no frame name (using a WITH) so it creates a new unnamed frame (and seems to have put it on top of anything else).

    You should add "WITH FRAME <correct_frame_reference>" or, depending on why you are displaying the value from within the trigger, you might be better off using MESSAGE.