Table of Contents

Programming Techniques: Overview

This chapter provides concrete, "real world" examples of OpenInsight programming, based on actual problems that need to be solved to get applications up and running. Frequently it's not enough to know the syntax of a particular command or function. What's necessary is to gain insights into how to solve particular problems. The purpose of the sections that follow is to help you to gain added facility in OpenInsight through problem solving. Where needed, actual coding examples are shown. Simply copy them from the text and paste them into your OpenInsight application.

Finding Users Logged In To OpenInsight

Finding Users Who are Logged In

Application Maintenance Considerations

Application Maintenance Considerations

Database Template (.DBT) Files

Database Template (.DBT) Files

How an OpenInsight Database is Loaded into Memory

Structure of SYSTABLES and SYSVOLUMES

Operations that Affect SYSTABLES and SYSVOLUMES

How SYSCOLUMNS Is Used

Database ID vs Application ID

DBT File Structure

Problems with DBT Files

Synchronizing the Volume and Table Information

Licensing Considerations

Removing Indexes Manually

Removing Indexes Manually

When to Remove an Index Manually

Finding the Indexes

Removing the Bang File

Dictionary Cleanup

Final Steps

Updating A Deployed Application

Updating A Deployed Application

Identifying Changes to be Deployed

Creating a Deployment Definition for the Upgrade

Upgrading the Deployed Application

Building RDK Files Into A Self-contained Executable

Capturing Mouse Events in a Form

Catching Mouse Events in a Window

Coding the CREATE Event for Capturing Window Mouse Events

Coding the WINMSG Event for Processing Mouse Events

"Collector Windows" in OpenInsight

Collector Window Overview

Passing Data from a Window to a Dialog Box

Processing the Received Data in the Dialog Box

Passing Data from the Dialog Box to the Window

Processing the Received Data in the Window

Displaying Dynamic Text Using the Msg() Function

Displaying Dynamic Text Using the Msg() Function

Changing The Msg() Text During Process Execution

Hierarchical List Boxes

How to Create a Simple Hierarchical List Box

Hierarchical List Box Programming Using Tabs

Hierarchical List Box Programming Using Bitmaps

Populating a Hierarchical List Box Dynamically

Hierarchical List Boxes FAQ

Types of Event Handlers

Where Event Code is Stored

How a Promoted Event Fits in the Event Chain

Promoted Events and the Repository

The Five Steps to Creating a Promoted Event

Promoted Events in Action

Deploying Promoted Events

Deploying Promoted Events

Removing Promoted Events

Removing Promoted Events

Storing Images in Linear Hash Tables

Storing Images in Linear Hash Tables

Storing a Path to the Image

Using the CHOOSEFILE Dialog Box

Transaction Processing

Transaction Processing

Sample Transaction Processing Subroutine

User Defined Conversions

User Defined Conversions

Creating a User Defined Conversion

PHONE_FORMAT Conversion

Purpose of PHONE FORMAT Conversion

PHONE FORMAT Conversion Source Code

NUMTOCHAR_CONV Conversion

NUMTOCHAR CONV Conversion

Text Case Conversion - UPPER_CASE

Text Case Conversion - UPPER CASE

ZIP_FORMAT Conversion

ZIP FORMAT Conversion

Using OIPI to Export to Files

Using OIPI to Export to Files

Exporting Your Report to a RTF PDF or HTML File

The EXPORTDATA Message

Windows API Examples

Windows API Examples

Keyboard Characteristics

Keyboard Characteristics

Flashing a Window

Flashing a Window

Reading and Writing File Attributes

Reading and Writing File Attributes

Reading File Attributes

Writing File Attributes

Reading and Writing Environment Variables

Reading and Writing Environment Variables

Reading the Environment PATH Variable

Writing an Environment Variable

Reading a Registry Value

Reading a Registry Value

Displaying Memory Size

Displaying Memory Size

Disabling the Window Close Button

Disabling the Window Close Button

Procedure to Disable Window Close Button

Zoom Functionality

Creating Zoom Functionality

The Zoom Window CREATE Event

Coding the OK Button CLICK Event in the Zoom Window

Coding the CANCEL Button Quick Event in the Zoom Window

The ZOOM Function

The ZOOM Menu Item Settings

Calling the ZOOM Function