The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Upgrading NTabEd from Version 7.2 to Version 8.0


Question:

Which properties do I have to change and what do I have to account for when upgrading NTabEd from version 7.2 to version 8.0?

Answer:

NTabEd, Release 8.0, does no longer maintain its data in private fields but uses the new class TDataTable as a container. NTabEd now publishes the variable Data (of type TDataTable). Many of the methods and properties of the old NTabed have been moved to TDataTable. This change of NTabEd requires some steps on your side to migrate your code to the new version. Due to the new data container Data you have to adjust various properties and methods (mostly by inserting "Data." before the property or method name. The following description provides step by step instructions how to upgrade to version 8.0:

Step 1: Load the application into the Delphi IDE and recompile the application. The compiler will point you to the lines where you have to edit the code.

Step 2: Change the problematic code. Hints on the kind of action required are given in the table below:

Version 7.2
old version
Version 8.0
change to/replace by (changes are in red color)
Remarks
NTabEd1.FData NTabEd1.Data.NumericData
see Data and NumericData for details
The old data matrix FData has been moved and is now part of the data container (Data.NumericData).
NTabEd1.ImportASCFile (FName, LastFirstPart);,
NTabEd1.ImportASCStream (FName, LastFirstPart);
NTabEd1.Data.ImportASC (FName);,
NTabEd1.Data.ImportASC (InStream);
see Data and ImportASC for details
The import method ImportASCFile has been renamed to ImportASC and moved to TDataTable. The parameter LastFirstPart is no longer required.
NTabEd1.ExportASCFile,
NTabEd1.ExportASCStream
NTabEd1.Data.ExportAsASC;
see Data and ExportAsASC for details
The export methods ExportASCFile and ExportASCStream have been renamed to ExportAsASC (overloaded) and moved to TDataTable.
NTabEd1.ReadFromASCFile,
NTabEd1.ReadFromASCStream
NTabEd1.Data.ReadFromASC;
see Data and ReadFromASC for details
The import methods ReadFromASCFile and ReadFromASCStream have been renamed to ReadFromASC (overloaded) and moved to TDataTable.
NTabEd1.ReadHeaderOfASCFile,
NTabEd1.ReadHeaderOfASCStream
ReadHeaderOfASC These two methods have been changed into a normal (overloaded) function and moved to the unit FILESYS. See ReadHeaderOfASC for more details.

Step 3: If required insert the following 'uses' statement into the implementation section (this is required due to the fact that several common type declarations have been moved to the unit sdlbase):


   uses sdlbase;

Typically, an error message such as "Undeclared identifier 'maPan'" is displayed, if the reference of unit sdlbase is missing.

Step 4: Compile the new code and test it.


Last Update: 2012-Oct-20