Consultor Eletrônico



Kbase P129527: How to use the UIB to write TTY applications
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/5/2009
Status: Unverified

GOAL:

How to use the UIB to write TTY applications

GOAL:

How to write portable user-interfaces to character and Windows

GOAL:

How to build tty applications using UIB

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

There are a few steps that a UIB user can follow if they want to use the UIB to create character applications. However, there are significant caveats in doing this.

Steps To Follow: Creating a Character Mode Application

1) Create a window that is a slightly larger than your ultimate character environment. Remember not to include space for MENU-BAR(1 line), MESSAGE-AREA (2 lines) and STATUS-AREA (1 line) in your calculation.

2) In the Window Attribute Editor, check the toggle for Suppress Window Creation [TTY mode does not support new windows].

3) Remember that you want to work in a 1-character unit fixed-font grid. You want to be in a situation of having a grid that matches this font. You also want a font that allows 80 columns of work area.
4) Save your files. These files will run in a character mode version

Caveats

1) In TTY, the menubar , message area, and status line subtract from the usable area of the window. The UIB acts like GUI-Progress and adds these areas to the size
2) The UIB has no place to store PFCOLOR or DCOLOR [Use BGCOLOR and FGCOLOR instead ]
3) When sizing widgets, remember that the borders are going to be different. For example: if you have a fill-in with "X(8)", size the fill-in to be 8 columns because TTY has no decoration (even though in GUI, this will only hold characters). For other widgets, you should assume larger borders when planning your layouts.


4) Remember that inner-lines map to about .5 PPU's in GUI but to 1 PPU in TTY. So multi-line widgets (editor and selection lists) will look like they can hold twice as many items (lines) as they would at run time.

Major Limitations

All UIB output is explicitly sized. This is not necessary for character mode applications.

Porting Rectangles and Sliders is especially hard to visualize because their graphic formats are so different between platforms

Can't but in a label with trailing spaces which is very useful for buttons (or labels) eg " OK " which would create a button
< OK >