Upgrading from OWL 1.0
>Upgrading from OWL 1.0
Introduction to OWL 1.0
The first version of the Object Windows Library, introduced by Borland in BC 3.1, used
Dynamic Dispatch Virtual Tables (DDVT), a non-portable Borland extension to C++. These tables looked like this:
virtual void HandleListBoxMsg(TMessage &Msg) = [ID_FIRST + ID_LISTBOX];
and were used to handle the various Windows messages. In OWL 2.0 and later versions the
event response tables were introduced and replaced DDVT.
Another change was the move from containers using Object-based hierarchy to template-based container classes (BIDS).
It is possible to port an OWL 1.0 application to 32-bit OWLNext under C++ Builder or Visual C++, although in some cases
it may be better to redesign and rewrite the user interface from scratch.
Porting applicatons from OWL 1.0 to OWLNext
- Upgrade the application to OWL 2.0. It can be done with the help of the
OWLCVT utility, which is included in Borland C++ 4.x.
The utility is mentioned in several places in the documentation of BC++5.x, but is not included in it.
The latest version which have OWLCVT is BC++ 4.53.
The conversion process is covered in detail in the Object Windows Programmer's Guide. One possible route is
by using BC4.5x IDE:
- Open the .prj file in the IDE.
- Set the include directories to BC45\INCLUDE\OWLCVT;C:\BC45\INCLUDE\OWLCVT.
- Turn off RTTI in the C++ Options.
- Compile the project and corect all compile-time errors. Don't bother with linking.
- Select all .cpp nodes and run Special|OWL Convert.
- Turn on RTTI in the C++ Options and compile the application
- Port to 32-bit application. Take care of the usage of int variables, as their size will change.
- Upgrade to Borland C++ 5.x / OWL 5.0. One of the changes from OWL 2.0 is the introduction of bool type.
Also take care of the change of scope of the for control variable. If you plan to port to VC6,
make sure to maintain compatibility with both variants.
- Upgrade to Borland C++ 5.x / OWLNext. Also you may move from BIDS containers to STL ones.
- Now you can choose the development tools which support OWLNext: Borland C++ 5.x, C++ Builder 5/6, Visual C++ 6.0, Visual C++.NET or GCC
and port the application.
Revised: May 11, 2004.
|