OpenEdge Development: Progress 4GL Handbook
![]() ![]() ![]()
|
Table of Contents
Getting started with the 4GL—the Progress snowplow
In the beginning…FOR EACH CUSTOMER
Starting your OpenEdge session
Basic characteristics of the Progress 4GL
A 4GL procedure consists of statements
The 4GL combines procedural, database, and user interface statements
Refining the data selection with a WHERE clause
Creating nested blocks to display related data
Using program variables and data types
Placement of variable definitions
Defining an IF-THEN-ELSE decision point
Using the Progress Unknown value
Putting a calculation into your procedure
Arithmetic expressions and operands
Using the Intelligent Edit Control and its shortcuts
Saving and compiling your test procedure
Running Progress 4GL Procedures
Using external and internal procedures
Assigning a value to a variable
When to use internal and external procedures
Adding comments to your procedure
Introducing the OpenEdge AppBuilder
Creating a new procedure and window
Changing object names and titles
Saving a procedure from the AppBuilder
Adding a browse to your window
Looking at preprocessor values in the Code Preview
Defining a CHOOSE trigger for your button
Defining user interface events
Adjusting the layout of the buttons
Examining the Code the AppBuilder Generates
Viewing the entire sample procedure code
Window, button, browse, and frame definitions
Contrasting procedural and event-driven programs
Advantages of the AppBuilder file format
Procedure Blocks and Data Access
Language statements that define blocks
Data access without looping – the FIND statement
Record Buffers and Record Scope
Generating a procedure listing file
Adding procedures to the test window
Defining h-OrderCalcs.p to calculate totals
Writing the BinCheck procedure to check inventory
Displaying the new fields in the window
Using the VIEW-AS phrase for data representation objects
Defining objects that don’t represent data values
Using and setting object attributes
Common attribute values for visual objects
Instantiating and realizing objects
Instantiating objects in a container
Realizing and derealizing objects
Applying events in your application
Using Graphical Objects in Your Interface
Using data representation objects
Modifying fill-in attributes in the Properties Window
Changing a fill-in field to an editor
Adding a toggle box to the window
Objects that display a list of choices for a data value
Using a radio set to display a set of choices for a value
Using rectangles to organize objects
Using images to display pictures
Defining a menu bar for the sample window
Providing Help for OpenEdge Applications
Accessing online help from the menu bar
Calling online help with a help button
Accessing online help with the help key
Quitting help when exiting the application
Why you use queries in your application
Queries versus block-oriented data access
Using queries to share data between procedures
Using queries to populate a browse
OPEN and CLOSE QUERY statements
Determining the current number of rows in a query
Identifying the current row in the query
Extending the sample window to use the queries
Defining and Using Temp-tables
Using temporary tables in your application
The temporary database for temp-tables
Using a temp-table to summarize data
Using a temp-table as a parameter
Defining a procedure to return Order Lines
Using BUFFER-COPY to assign multiple fields
Using include files to duplicate code
Adding an Order Line browse to the Customer window
Planning for the size of the result set
Changing the test window for the OrderLine browse
Enabling columns in the browse
Defining a single- or multiple-select browse
Browse selection and query interaction
Sizing a browse and browse columns
Manipulating rows in the browse
Manipulating the browse itself
Changing the row height of the browse
Using browse objects in character interfaces
Functional differences from the Windows graphical browse
Advanced Use of Procedures in Progress
RETURN statement and RETURN-VALUE
Running a procedure PERSISTENT
Using a persistent procedure as a run-time library
Useful procedure attributes and methods
Using a persistent procedure as shared code
Using a persistent procedure to duplicate code
Deleting persistent procedures
Examples: Communicating between persistent procedures
Shared and global objects in Progress procedures
Why you generally shouldn’t use shared objects
Global shared objects in Progress
Defining Functions and Building Super Procedures
Making a forward declaration for a function
Using the AppBuilder to generate function definitions
Making run-time references with DYNAMIC-FUNCTION
Using super procedures in your application
Super procedure language syntax
Using session super procedures
PUBLISH and SUBSCRIBE statements
Handling Data and Locking Records
Overview of data handling statements
Making sure you release record locks
Optimistic and pessimistic locking strategies
Updating Your Database and Writing Triggers
Building updates into an application
Accessing and defining triggers
General trigger considerations
Controlling the size of a transaction
Transactions and trigger and procedure blocks
Checking whether a transaction is active
The NO-UNDO keyword on temp-tables and variables
Using the UNDO statement in the sample procedure
Using the ON phrase on a block header
Using Dynamic Graphical Objects
Assigning triggers to a dynamic object
Are widget pools static or dynamic objects?
Manipulating the objects in a window
Reading and writing object attributes
Identifying the columns of a browse
Using the CAN-QUERY and CAN-SET functions
Adding dynamic objects to a window
Using a buffer handle and buffer field handles
Adding dynamic fields to the test window
Notes on dynamic browses and browse columns
Extending the sample procedure with a dynamic browse
Navigating the hierarchy of menu handles
Adding a dynamic menu to the test window
Using Dynamic Queries and Buffers
Using dynamic queries and query handles
Using the QUOTER function to assemble a query
NUM-RESULTS and CURRENT-RESULT-ROW attributes
Extending the sample window to filter dynamically
Defining a trigger block for multiple objects
Using the SELF handle to identify an object in a trigger
Using INDEX-INFORMATION and a MESSAGE with a yes/no answer
Using dynamic buffers and buffer handles
Specifying the lock or wait option as a variable
Extending the test window to use a buffer handle
Special dynamic buffer considerations
Creating and Using Dynamic Temp-tables and Browses
Creating and using dynamic temp-tables
Temp-table buffer methods and attributes
Changing field attributes in a temp-table buffer
Cleaning up a dynamic temp-table
Extending the example to create and display records
Creating and using dynamic browses
Extending the test procedure with a dynamic browse
Adding columns to a static browse
Query methods for use with browses
Building a comprehensive example
Creating a dynamic browse and customizing its display
Reading the database metaschema data
Populating a selection list dynamically
Creating a dialog box procedure
Using the SESSION handle to identify dynamic objects
Dynamic programming considerations
Progress Programming Best Practices
Using NO-UNDO variables and temp-tables
Grouping assignments with the ASSIGN statement
Using BUFFER-COPY and BUFFER-COMPARE
Hiding screen contents when making changes
Defining efficient queries and FOR EACH statements
Copying temp-tables as parameters
Setting your Propath correctly
Database and AppServer-related issues
Configuring your session using startup options
Cleaning up dynamically allocated memory
Making the best use of dynamic objects
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |
![]() ![]() ![]()
|