Object Oriented Types
SQLWindows/Team Developer types do not expose any method or property and can be used only via static functions such as SalStrLeft(), SalNumberToStr(), etc. There is nothing wrong with this, but it's a bit outdated and doesn't look too good to developers expecting to work with .NET or Java.
The PPJ Framework has redefined all Sal static methods in the PPJ types making it possible for developers to work using a modern Object Oriented approach also for basic code structures. Ported code has also been automatically transformed to use OO syntax.
A complete reference of all classes, methods and properties is beyond the scope of this manual and can be found in the PPJ Framework Reference. Thanks to Visual Studio's powerful IntelliSense technology, all methods and properties are also easily available while coding.
SalString
All SalStr* functions are also available as instance methods of the SalString class. The naming convention used has been to remove the SalStr prefix. For example: SalStrLeft(s, 10) is s.Left(10).
Global system constants are also implemented as static properties such as: SalString.Empty or SalString.Null.
SalNumber
All SalNumber* functions are available as instance methods of the SalNumber class. The naming convention used has been to remove the SalNumber prefix and to rename some standard methods. For example: SalNumberToStr(n, 2) is n.ToString(2).
Global system constants are also implemented as static properties such as: SalNumber.Null.
SalDateTime
All SalDateTime functions are available as instance methods of the SalDateTime class. The naming convention used has been to remove the SalDate prefix and to rename some standard methods. For example: SalDateToStr(dt) is dt.ToString().
Global system constants are also implemented as static properties such as: SalDateTime.Null or SalDateTime.Current.
SalFileHandle
All SalFile* functions are available as instance methods of the SalFile class. The naming convention used has been to remove the SalFile prefix and to rename some standard methods. For example: SalFileOpen(hFile, name, flags) is hFile.Open(name, flags).
Global system constants are also implemented as static properties such as: SalFileHandle.Null.
SalWindowHandle
All visual functions that operate on a window handle are also available as instance methods of the SalWindowHandle class. There is no straightforward naming convention here because the original SAL functions are named differently depending on the functionality and are not always consistent.
For example: SalSetWindowLoc(hWnd, x, y) is hWnd.SetLocation(x, y).
SalSqlHandle
All Sql* functions that operate on a sql handle are available as instance methods of the SalSqlHandle class. The naming convention used has been to remove the Sql prefix. For example: SqlConnect(hSql) is hSql.Connect().
Controls
All PPJ controls are directly derived from .NET controls, therefore they already expose all standard .NET methods. In addition to the methods and properties directly inherited from the base class, PPJ controls also implement all SAL visual functions that are generic for all controls plus the ones that are specific for the control type.
For example: SalSetWindowLoc(df1, x, y) is df1.SetLocation(x, y).
Last updated