Post by Wayne Niddery (TeamB)Post by Maël HörzTP for Windows was awful, Delphi was RAD, and that was close to
revolutionary.
Compared to Delphi, the framework in TPW certainly pales, but calling it
horrible is rather unfair.
[deletia]
Post by Wayne Niddery (TeamB)I wrote my first two professional Windows apps using TPW and due to my
knowledge of both the classes there and the Windows API I gained, the
transition to Delphi was rather easy and pleasant.
I also wrote my first Windows app in TPW1.0 and 1.5 - 70k lines of OWL code.
Delphi 1 and VCL was a slap in the face at the time. So much code had to be
tossed away and rewritten.
After years of Turbo Pascal with no syntax highlighting, I had developed a
habit of CAPITALIZING reserved words. Boy, did I have to work long and hard
to unlearn that habit... :)
The visual form designer made resource files, which was handy for
handtweaking.
Some excerpts from ancient code for effect:
--<snip>-- dlg.rc --
DLG_ABOUT DIALOG 23, 27, 143, 96
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CLASS "BorDlg"
CAPTION "About"
FONT 10, "Arial"
BEGIN
CONTROL "Button", 1, "BorBtn", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 55,
72, 32, 20
CONTROL "Insert version here", 102, "STATIC", SS_CENTER | WS_CHILD |
WS_VISIBLE | WS_BORDER, 7, 40, 129, 10
ICON "APP_ICON", 101, 63, 20, 16, 16, WS_CHILD | WS_VISIBLE
CTEXT "Insert name here", 100, 7, 8, 127, 9
CONTROL "Copyright © 1993 ", 103, "STATIC", SS_CENTER | WS_CHILD |
WS_VISIBLE | WS_GROUP, 7, 53, 128, 10
CONTROL "", -1, "BorShade", BSS_GROUP | BSS_LEFT | WS_CHILD | WS_VISIBLE,
4, 4, 135, 60
CONTROL "", -1, "BorShade", 2 | WS_CHILD | WS_VISIBLE, 0, 68, 144, 4
END
--<snip>-- dlg.pas --
UNIT dlg;
INTERFACE
USES
Strings, WinTypes, WinProcs, Objects, oDialogs, oWindows, BWCC;
TYPE
pAboutDlg = ^AboutDlg;
AboutDlg = OBJECT(TCenteredDialog)
T_SB,
V_SB : pStatic;
Icon : pIcon;
CONSTRUCTOR Init(aParent:pWindowsObject);
DESTRUCTOR Done; VIRTUAL;
PROCEDURE SetupWindow; VIRTUAL;
END;
IMPLEMENTATION
CONSTRUCTOR AboutDlg.Init(aParent:PWindowsObject);
BEGIN
Inherited Init(aParent, 'DLG_ABOUT');
New(T_SB, InitResource(@Self, 100, 40));
New(Icon, InitResource(@Self, 101, GetMainIcon));
New(V_SB, InitResource(@Self, 102, 40));
END;
DESTRUCTOR AboutDlg.Done;
BEGIN
Dispose(V_SB, Done);
Dispose(Icon, Done);
Dispose(T_SB, Done);
Inherited Done;
END;
PROCEDURE AboutDlg.SetupWindow;
BEGIN
Inherited SetupWindow;
T_SB^.SetText(Config^.FileDescription);
V_SB^.SetText(Config^.ProductVersion);
END;
END.
--<snip>--
--
Lars F. http://lars.fosdal.com