|
|
|
|
Migrating to APRO 4Async 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 componentsThe 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
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 functionalitySome 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 systemsIn 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 issuesThe 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 packagesIf your project built with APRO 3 is requiring run-time
packages, you will need to remove the reference to the APRO 3
To change the
To change the
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.
|