Monthly Archives: December 2004

Delphi Configuration Manager

Jeremy North has written what looks like (I haven’t actually tried it) a neat little tool to allow Delphi 2005 users to configure the IDE. Basically, the tool allows the user to control which packages and therefore which features will load when the IDE is launched. R&D has talked about doing something like this for awhile now but haven’t gotten the chance (yet). Using this tool it’s possible to reduce the load time of the IDE and in some cases significantly.

Check it out, I think a lot of Delphi customers could find it useful.

Modifying Generated Code Templates in Delphi 2005

NOTE: This information falls under the use at your own risk category.  During
the Internet Team chat session we recorded the other day the issue of being able
to modify the code that the IDE generates when you create new WebForms came up
and I mentioned that I would blog about it. Well, here is that blog entry. If
you want to change the code that is generated for many of the different file
types that the IDE creates you should look in your Delphi 2005 folder for a subfolder
named ObjRepos which contains all of the template files that the IDE uses to
generate File|New items.

For example, let’s say you have a stylesheet that you always use for your
HTML pages. You could change the template for HTML files to always link to your
stylesheet so that you don’t have to manually add it each time.  Here are the
steps you would follow to make this change:

  1. Open the Delphi 2005\ObjRepos\Markup folder
  2. Find the file HTMLPageTemplage.htm and edit open using your favorite editor
  3. Add a LINK tag to
    the HEAD section of the page template file
  4. Save the changes

That’s it!  You’ve now modified the default page template for HTML files to
always include your own stylesheet.  Pretty sweet huh?  You can do the exact
same thing for many other file types used by the IDE.  Another example is if you
didn’t want the ASP.NET debug settings in your machine.config file you could
change the web.config file under .\objrepos\DelphiDotNet to include the same
debug settings so that every ASP.NET application you create in Delphi will
automatically have those settings (not necessarily a great idea because of
deployment issues). For more information refer to this

I don’t have a table which maps all of the files to there specific file types
so you might have to do a bit of digging before you find the one you want. 
Also, changing these files isn’t supported so if you mess them up and your IDE
no longer functions correctly either restore the files from the installation CD
or reinstall the product.  Whatever you do don’t come looking for me to fix the
problem!  🙂

What are the ASP.NET debug changes made to machine.config when installing Delphi 2005?

When you install Delphi
2005 with the intention of developing ASP.NET applications on IIS you are given
the opportunity to allow the install to change your machine.config file in order
to support ASP.NET
debugging.  Well, during our internet chat session the other day someone asked
“What are those settings?”

Well, for Delphi 2005 here is the answer:

Open %systemroot%\\Framework\v1.1.4322\CONFIG\machine.config
using Notepad.

  1. Under the element <compilation…> there is a subelement <assemblies> to which you need to add the following:
    <add assembly="Borland.dbkasp, Version=, Culture=neutral, PublicKeyToken=b0524c541232aae7" />
  2. Then, search for <httpmodules> element and add:
    <add name="DbgConnect" type="Borland.DbkAsp.DbkConnModule, Borland.dbkasp, Version=, Culture=neutral, PublicKeyToken=b0524c541232aae7" />>

That’s it. Adding those elements will ensure that you can debug ASP.NET
applications using Delphi 2005 on IIS. These settings are only required if you
are debugging ASP.NET applications running on IIS they are not
required for Cassini or any other web server.

Without these settings you will likely see the error message “Unable to
attach to ASP.NET worker process (typically aspnet_wp.exe or w3wp.exe)” or
something close to it.

We recommend that you either use these settings in machine.config OR in each
ASP.NET web application’s web.config file but not both. Additionally, you do not
want to deploy a web.config file that includes these changes.

[UPDATE: Dec 15 2004] Fixed path to machine.config

Adding Delphi developer blogs to the Welcome page

I totally forgot about this until now!  The Delphi 2005 Welcome page has a combobox
that contains a list of various blogs which you can point to.  During the
development of the product I had added numerous team member personal blogs to
the list which were removed just prior to RTM (for various reasons).  The blogs
were actually just commented out and not removed altogether.  Here is how you
can get those blogs added back to the list:

  1. From Windows Explorer locate the Welcome page folder under your Delphi 2005
    installaction folder.
  2. Select the Welcome page folder and then select the sub-folder called “xml“
  3. Open the file called defaultProviders.xml using the IDE (thus getting syntax
    highlighting) scroll down to the bottom of the file and you’ll notice a number
    of items in the Borland Blogs
    section that are commented out.  Simply remove the commenting then
    reload/refresh your Delphi Welcome page and the new items will appear in the
    feed combobox.


Adding your favorite links to the Delphi 2005 Welcome page

In Delphi 2005, it’s
easy to modify the Welcome page menubar (the left column of the page) and add
your own favorite links.  Here are the necessary steps:

  1. From Windows Explorer locate the Welcome page folder under your Delphi 2005
    installaction folder.
  2. Select the Welcome page folder and then select the sub-folder called “xml“
  3. Open the file called menuBar.xml using the IDE and add a new section (or
    modify an existing section if you like) as follows:
            <title>Steve’s Blogtitle>

How to display more than 10 RSS entries on the Delphi 2005 Welcome page

By default the Javascript code that processes the RSS feeds on the Welcome page limit the number of entries displayed to ten.  Ten was simply a nice round number and is, unfortunately, a hardcoded value.  However, since the Javascript source code is readily available from the Welcome page directory of your Delphi 2005 installation you can easily change this number to whatever value you want.  To do that simply follow these steps:

  1. From Windows Explorer locate the Welcome page folder under your Delphi 2005 installaction folder.
  2. Select the Welcome page folder and then select the sub-folder called “js“
  3. Open the file called rss.js using the IDE (thus getting syntax highlighting) and search for “limit to 10“ and you should see the following:
// limit to 10 entries displayed on welcome page
if (maxItems > 10)

Simply change “10” (in the code portion of course 🙂 to the number of items you’d like to be able to see.