Migrating to APRO 4

Async Professional 4 has several new components, components to implement new features or technologies (for example, the state machine, SAPI and IP Telephony components) as well as components that replace ones from earlier versions of APRO. This TechTip discusses how to use the APRO 4 components in legacy projects made with previous APRO versions.

Deprecated components

The biggest issue is that APRO 4 has deprecated all of the components from the APRO 3 "APRO 2.x" tab on your component palette as well as the TApdSModem component.  The source for these deprecated components are still installed in your APRO\Deprecated folder, but they are not installed in your IDE or any packages.  The source units do not have any registration code in them, to install them in your IDE, you will need to create a registration unit with the appropriate registration code, and install that unit into a package of your choosing.

These components were deprecated for a variety of reasons.  The TAdTerminal, TApdVT100Emulator and TApdTTYEmulator replaced the TApdTerminal, TApdEmulator and TApdKeyBoard emulator, which provide a cleaner and more robust terminal emulation. The TApdModem, TApdSModem and TApdModemDBase components relied on an ini-database file that is difficult to maintain, these components were replaced by the TAdModem and TApdLibModem components (which use the modemcap XML-based database).  Finally, the phone book components were deprecated because they were very limited in their scope and could easily be replaced with other techniques.

If you are using these deprecated components, we recommend that you use the replacement components.  If that is not feasible, then install the deprecated components.

Deprecated functionality

Some methods have been deprecated as well.  The TApdComPort.WaitForString, .WaitForMultiString methods and OnWaitChar event have been deprecated.  These methods and event are still available; their deprecation consists of removing the documentation and moving the OnWaitChar event out of the published section.  If you are using the OnWaitChar event handler, you will get a warning when loading the form that says something like "Error reading ApdComPort1.OnWaitChar. Property does not exist."  Click the 'Ignore' button. You'll have to add the event handler dynamically, which you can do with something like this:

 

procedure TForm1.FormCreate(Sender: TObject);

begin

  ApdComPort1.OnWaitChar := ApdComPort1WaitChar;

end;

 

for Delphi, or this for C++ Builder:

 

void __fastcall TForm1::FormCreate(TObject *Sender)

{

  ApdComPort1->OnWaitChar = ApdComPort1WaitChar;

}

 

Another deprecated feature is the B+ protocol. This protocol was deprecated because CompuServe does not support terminal-mode transfers any more (they stopped supporting it when CompuServer2000 was released).  Since that was a proprietary protocol, no other services are licensed to implement the server side of the protocol.

 

Deprecated compilers and operating systems

In addition to the deprecated components and functionality mentioned above, APRO 4 has also deprecated support for Delphi 1, Delphi 2 and C++ Builder 1.  Delphi 1 is still required, and supported, for building the printer driver for Windows 95/98/ME, any other use is not supported.  We did this to take advantage of some compiler features (such as the TCollection) that are only available in Delphi 3 and C++ Builder 3 and above. We have also dropped support for Windows 3.x.

Other compatibility issues

The low-level code is very similar to what was in APRO 3.  A "normal" APRO app should be able to load, compile and run just by installing the new APRO 4 source. Obviously, you should test your project to make sure that everything still works as expected.  The APRO 4 components that were in your APRO 3 projects have been changed to varying degrees: to add new functionality or to remove dependencies on deprecated components.

A short note about packages

If your project built with APRO 3 is requiring run-time packages, you will need to remove the reference to the APRO 3 package and replace it with the corresponding APRO 4 package.  This is particularly important for C++ Builder projects.  C++ Builder enables run-time packages by default; Delphi does not.

To change the package references in Delphi, open your project options dialog.  In the Packages tab of that dialog, there is a "Run-time packages" edit control near the bottom of the dialog.  If you see "A30x_Rxx" in there, then change that to "A40x_Rxx".  When you're done with that, rebuild your project and you're done.

To change the package references in C++ Builder, do the same thing as you would do for Delphi above.  Then, open up the project make file, or the options source for C++ Builder 5.  Look in the "Packages", "Libraries" and "SpareLibs" lines for the A30x_Rxx packages and libraries.  Rename those to "A40x_Rxx", save the make file/options source, rebuild your project and you're done.

Before deploying your application, remove or rename the "A30*_R*" packages from your search path and try to run your project. This will reveal any hidden dependencies on the old packages.

This site is not affiliated, endorsed, or otherwise associated with the entity formerly known as TurboPower Software. The owners and maintainers of Aprozilla.com were merely meager employees of the aforementioned organization, providing this site out of the pure goodness of their collective hearts. SourceForge.net Logo

Last updated: July 22, 2003.