Tuesday, February 24, 2004

f a l a f e l s o f t . c o m

f a l a f e l s o f t . c o m

I am certainly excited about this opportunity to speak in additional forums about Borland products and technologies. Alain "Lino" Tadros has been a long-time supporter of Borland products and a fellow member of the Borland Conference Advisory board.

Tuesday, February 17, 2004

Delphi 7 packages for using the Delphi 8 Win32 compiler.

OK... here's the scoop. I've just uploaded a new version of the Delphi 8 IDE Integration pack to code central. This version contains several Delphi 7 IDE packages recompiled to now target the Delphi 8 Win32 compiler. Included is instructions on how to install these files into your existing Delphi 7 installation. Please only download this if you have Delphi 8, since Delphi 7 is included with Delphi 8. Previous versions of Delphi are NOT supported, so don't even ask. Also note that this is provided strictly as-is, without any warranties, and is not guaranteed to be stable with the Delphi 7 IDE. If you follow the instructions in the readme, then these files should not render your Delphi 7 installation useless. I recommend only the advanced user attempt this.

OK, so where is it? Try here. Also, here's the text from the readme:

Installation instructions for IDE integration pack for Delphi 8.

NOTE: This software is provided AS-IS. No support of any kind will
be provided by Borland or any of its agents. Use at your own risk.

This software is manually installed into an existing Delphi 7 installation.

Part I - Getting the files

1. Open a command prompt window (COMMAND.COM or CMD.EXE).
2. cd "Program FilesBorlandDelphi7" (or wherever you've installed Delphi).
3. Unzip the contents of the ZIP file into this directory *including the
path information*.
4. Two directories should be created, d8bin and d8lib.
5. cd d8bin
6. Copy ..bindelphi32.exe .

Part II - copying and modifying IDE settings.

NOTE: Editing the registry can be dangerous. Perform the following very carefully.

1. Run RegEdit.exe
2. Open key HKEY_CURRENT_USERSoftwareBorlandDelphi7.0
3. Select File|Export.
4. Export this key to a filename of your choice (like Delphi7.reg).
5. Select the "7.0" key and press F2 (or right-click and select "Rename").
6. Change the 7.0 to 7.1
7. Select File|Import.
8. Select the filename previously saved in step 4.
9. Open HKEY_CURRENT_USERSoftwareBorlandDelphi7.1Known IDE Packages
10. Rename value-name $(DELPHI)bindelphide70.bpl to $(DELPHI)d8bindelphide70.bpl
11. If present, Rename value-name $(DELPHI)bindelphipro70.bpl to

Part III - Copying and modifying Integrated debugger evaluator settings.

1. Run RegEdit.exe
2. Open key HKEY_CURRENT_USERSoftwareBorlandDebugging7.0
3. Select File|Export.
4. Export this key to a filename of your choice (like Debugging.reg).
5. Select the "7.0" key and press F2 (or right-click and select "Rename").
6. Change the 7.0 to 7.1
7. Select File|Import.
8. Select the filename previously saved in step 4.
9. Open HKEY_CURRENT_USERSoftwareBorlandDebugging7.1Evaluators if present.
10. Rename value-name dcc70.dll to dcc71.dll

PART IV - Create shortcut and updating options

1. Create a new shortcut that runs the Delphi32.exe from the
"Program FilesBorlandDelphi7d8bin" directory.
2. Run Delphi32 from the d8bin directory.
3. Select Tools|Environment Options|Library.
4. Change the $(DELPHI)Lib directory entry to $(DELPHI)d8Lib.


These instructions for integrating the Delphi 8 Win32 compiler into Delphi 7 are
only intended for the user to create add-in components for the Delphi 8 IDE Only.
These add-ins *must* be created as a package. You can, however use the Delphi 7
IDE to build and debug these add-ins by creating a package project and setting
the host application to be the Delphi 8 IDE. Pursuant to the Delphi 8 license,
you may *NOT* redistribute *any* run-time packages that are included with Delphi 8.
What this means is that you cannot create an application based on this compiler
and distribute it as a stand-alone product. You can only create an application
designed to integrate with the Delphi 8 IDE.

Happy Birthday Delphi

It slipped by with just a slight whisper. February 14th (St. Valentine's day in the U.S.) marked the 9th anniversary of the initial launch of Delphi 1.0. It has been quite a journey.

I remember working fervently on the next release of Borland Pascal (integrated protected-mode debugging anyone?) while Chuck J. and Anders H. were off doing some interesting things to the Turbo Pascal language. One of the first things I remember them adding was the "class" syntax. This all sounds somewhat blase' but at the time is was exciting. Now the VMT pointer in a class was a 32-bit pointer. For the more "seasoned" among you, you might recall that the old "object" syntax limited the size and number of VMTs to what could fit in a 64k segment. This was because of the use of word-sized VMT pointers. No longer were the number of classes limited to this silly size restriction. Now a the VMT could be codegen'd into the same code segment as the code itself. Then came properties; I was starting to reel at this point... then the final kicker was virtual constructors and class references. Immediately, I began to look at all these language extensions and how I could apply them to Turbo Vision. I was also working with a hotshot compiler writer, Peter Sollich, on getting a 32bit version of Borland Pascal and 32bit Turbo Vision up and running.

Finally, one day, Gary Whizin (long-time Turbo/Borland Pascal/Delphi R&D manager), visits me in my office. He says, "You know that stuff Anders and Chuck are working on? We need an IDE that runs natively on Windows. All that work you've been doing on Borland Pascal 8.0 with integrating the new editor kernel, I need you to drop that and move over to getting it working in Windows." Looking back on this, I was still the new kid on the block and had no idea how much they must have trusted my ability when they handed me that task. I just simply stated, "Sure."

This was the spring of 1993. I had no idea that we were about to embark on a journey that has been one of the most exciting and rewarding of my career. You see, I started at Borland in January 1992 after about a year stint as a member of the relatively new online peer support group called, Team Borland for the Borland Compuserve forums. I had been invited into TeamB by Danny Thorpe after being very active in answering the questions from many of my peers. I remember answering a lot of OOP related questions since that was a relatively new model of programming and esspecially since it had just been introduced in Turbo Pascal 5.5. When Turbo Pascal 6.0 was released with the new Turbo Vision application framework, I took to it like a duck to water. It seemed so natural and simple. In fact I was one of the first ones to write a custom control and publish it for Turbo Vision. I must have caught the eye of someone at Borland, because in the fall of 1991, I came out to Scotts Valley for the Borland/Compuserve online picnic. This is where I met Chuck Jazdzewski. We had a lot in common. Newly married, (at the time ;-) two children, all boys, and we both had a passion for Turbo Pascal.

I've always believed that in order to learn, you must surround yourself with those you consider smarter and more talented than yourself. So, in early November 1991, I received an odd little e-mail from Chuck. It looked like a form letter that was sent out to several folks. It merely asked a few questions about the kinds of things for which I was using Turbo Pascal and esspecially Turbo Vision. So, I dutifully responded. A few days later I got another message asking if it was OK if someone contacted me to talk about this "survey." When I finally got this phone call, it quickly became obvious that this was a recruiter. So I asked, point blank, "So is this position for someplace like Tech Support?" The recruiter chuckled and said, "Oh no. This is an R&D position!" That was when I heard a loud thud... as my jaw struck the floor. I then had phone interviews with Chuck and Anders. Then, I flew to San Jose and drove to Scotts Valley where I endured two full days of grueling interviews. I was even interviewed by Danny Thorpe... and that didn't feel like an interview. We had dinner together down on the Santa Cruz municipal wharf. Must have worked out, because here I am, over 12 years later and still working on Delphi.

So, for me, Delphi has consumed over 11 years of my life. In that time, I now have four wonderful children, two boys and twin girls. Also, my wife has endured all those long hours and delayed vacations. In fact, my wife was with me on February 14th, 1995 in San Jose at SDWest for the launch of Delphi 1.0. Although, I've tried to make it up to her ever since ;-o...

So, Happy Birthday Delphi..

Tuesday, February 10, 2004

PopupMode and PopupParent

In VCL.NET (and for those of you paying attention, also in the version of Win32-VCL used in the IDE integration pack for Delphi 8) there is a new property on TCustomForm called PopupMode. This controls how the top-level form behaves with respect to Window's WS_POPUP style. A window that has the WS_POPUP style will always be above it's "owner" in Z-order. This is much like fsStayOnTop except it allows better control over the layering. Forms are now automatically set to pmAuto when ShowModal is called. One side effect of this this is that it will cause the window handle to be recreated, which at times can cause problems. If you explicitly set the PopupMode property to pmAuto prior to ShowModal, like at design-time, then the recreate isn't nessesary.

Also, you probably want to set the PopupMode to pmExplicit for non-modal design windows such as tool-palettes and other floating tool windows, which will cause the windows to always remain on top of the main form. In the case of a snapped together IDE (ie. the editor is docked to the main form), then the design window will remain on top of the designer. If the IDE is in legacy undocked mode, the design window will still remain above the main form, but will now behave very close to before as it will allow other top-level forms to obscure the design-window (just like pre-Delphi 8).

There is another new property called PopupParent, that if set to an explicit TCustomForm, you can force the Z-Ordering of your forms and create a "stacked" appearance which the user cannot change. If PopupMode is pmExplicit and PopupParent is nil, then the Application.MainForm is implicitly used as the PopupParent. If there is no Application.MainForm assigned (like this is the first form created), then the PopupParent is Application.Handle, just like in previous versions of VCL. Finally, as long as the PopupMode is pmNone, then the behaviour is identical to pre-Delphi 8, except for the ShowModal item mentioned above. For PopupMode of pmAuto, Screen.ActiveForm is used as the PopupParent.

Finally, the reason for adding these properties is that it fixes an long-running bug in VCL that would allow a modal dialog show up behind another form on the screen giving the appearance of a hung application. The Delphi IDE would do this as well from time-to-time. With the introduction of Windows2000 and WindowsXP, Microsoft added a new feature called "window ghosting." If a top-level window hasn't processed a message within 5 seconds, Windows will "ghost" the form and allow you to drag, resize, and change the Z-order of the form, even though the application isn't processing any messages. The fact that it allows a Z-order change is what caused all the trouble. However, if the form had the WS_POPUP style and the "owner" was the correct window, even a "ghosted" form would not be allowed to switch Z-order to under it's owner, thus there is no chance for a modal dialog to suddenly disappear.

Friday, February 6, 2004

Delphi Feedback.

Here's your chance to let your voice be heard. Participate in the Delphi 2004 product survey. You can find the online survey here

Delphi 8 patch is now available

The first patch for Delphi 8 for Microsoft .NET is now available. You should check out both of these articles on BDN for more information: