Class: StatusPanel [Obsolete]

Properties  Events  Methods    Index of Classes

Supports a visual object to displayed by long-running processes that may be unattended to report errors that arise in the job



Library: Windows Application Class Library

Package: OldStatusPanel.pkg


This class is obsolete. It has been replaced with the cProcessStatusPanel class.

Status Panel Changes (as of DataFlex 12.0)

The old external sentinel based status-panel has been replaced by a new internal panel. This panel should be faster and should be much easier to customize. In most cases, the new panel should serve as no change required replacement for the old one. The old status panel is still available, it's just been renamed.

The new Status panel is based on the following hierarchy:

cStatusPanel   (abstract class)
        {object} Status_Panel

The Status_Panel object has the same file name (StatPnl.pkg), object name and interface used by the old sentinel based status panel.


This creates the standard status_panel object that is used as the default status panel in an application.

The standard for the default status panel object has always been that the package name is StatPnl.pkg and the name of the object is Status_Panel. This has not changed. As of 12.0, there are major changes in the way the status panel operates The sentinel based external status panel used in prior revisions has been replaced with a status panel that is part of the application. This should work much better and faster than the old sentinel based solution. While the way this operates has changed, the interface has not and therefore this should work with most applications.

As of 12.0, we have added a global handle that contains the object ID of this status panel. This variable ghoStatusPanel can be used in place of the object name Status_Panel. This provides a cleaner more robust interface.

Compatibility Note:

Status_Panel Object
When used in the standard way, this new object will require no changes. A developer will only need to change their code if they've modified the sentinel program, which was a difficult thing to do.

If for some reason your application will not work using this as a replacement for the old status panel, you've probably done something special with the old status-panel. If you don't want to figure out how to use the new one and you want to continue using the old one you are going to need to add some code to include the old status panel in your application. Add the following to your project (your src).

Use StatPnl.pkg // Make sure you load the new status panel object first. this is not optional!

Use OldStatPnl.pkg // load the old status panel. Status_Panel is now this old object

If you do this, you will lose access to the new status-panel via Status_Panel. However, you can still access the new object via the ghoStatusPanel handle.

StatusPanel Class
If you are using the old StatusPanel class you will need to make a change. As soon as possible you should change your application so it uses the new cProcessStatusPanel class. In the meantime you can continue to use the StatusPanel class and the newer cProcessStatusPanel and Status_Panel object in the same application.

The only change required to add support to for StatusPanel class is to add a "use OldStatusPanel.pkg" to your source:

Use OldStatusPanel.pkg // adds support for obsolete StatusPanel class

This adds support for the StatusPanel class but it does not create a Status_Panel object based on this class. If you need to add the object as well you want to "use OldStatPnl.pkg" as described above, which will include the StatusPanel class and the Status_Panel object.

Note that prior to 12.0, the StatusPanel class and Status_panel object were created in a single package, StatPnl.pkg. In 12.0, they are now in separate files, OldStatusPanel.pkg (StatusPanel class) and OldStatPnl.pkg (Status_Panel object). In addition, the new status panel code maintains the class and object in separate files, cProcessStatusPanel.pkg (cProcessStatusPanel class) and StatPnl.pkg (Status_Panel object).

You can tell if you will need this change by searching your source and seeing if you create any objects based on the StatusPanel class (i.e., search for "is a Status Panel"). If you find any instances of this, you should add OldStatusPanel.pkg to your application.

To summarize:
1. A new Status Panel class, cProcessStatusPanel has been added. This class replaces the StatusPanel class. It is faster, easier to use, and interface compatible. The global Status_panel object, now uses this new class.
2. If you are using the standard global Status_Panel object in a normal fashion, you should not have to make any changes
3. If you are creating any classes or objects based on StatusPanel, you will need to add "Use OldStatPnl.pkg" to your application.
4. If you must use the old Status_panel global object, you will need to add "Use StatPnl.pkg" followed by "Use OldStatPnl.pkg" to your application.

Class Documentation

StatusPanel is used to support a visual object to be displayed by long-running processes that may be unattended (batch processes) to report errors that arise in the job, the proportion to which the job is complete from time to time, and other information of potential interest to users running such jobs. This class supports the display of "host/sentinel" monitoring.


Use OldStatPnl.pkg

An object of this class named Status_panel is instantiated automatically by any program that uses its package. The object's behaviors are controlled entirely by messages sent to it.

Procedure theProcess
    Move (Status_Panel(self)) to StatPnl
    Send Initialize_StatusPanel of StatPnl aCaption aTitle aMessage
    Send Start_StatusPanel of StatPnl
        :   //process batch item(s)
        Send Update_StatusPanel of StatPnl aProgressString
        Get Check_StatusPanel of StatPnl to userCancel
    Until (done or userCancel)
    Send Stop_StatusPanel of StatPnl

Of Special Note

The status panel is used to create an interruptible progress dialog to be used during modal processes like report and batch processes. The panel is defined by setting the contents of several displayed areas:

Caption bar The value in the caption bar
Title A centered title that appears inside the dialog
Message A longer message that appears below the title
Action An area below that message that is used to display progress
Button A Cancel button that appears below the display

The panel is invoked by running a "sentinel" program that passes data back and forth between the modal process and the status panel. Because the panel and the process are separate processes, the monitored process can run at a very fast speed without the delays imposed by maintaining a display.

All the properties of this class are defined and set in the class. They cannot be changed in programs except by sending messages to the object.