The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Delphi’ Category

Delphi – Frames as visual Components – changing your inheritance

Posted by jpluimers on 2009/07/22

Did you ever get this error message when creating TFrame descendants?
Message

---------------------------
Error Reading Form
---------------------------
Error reading TDioptreFrame.ClientHeight: Property ClientHeight does not exist. Ignore the error and continue?
NOTE: Ignoring the error may cause components to be deleted or property values to be lost.
---------------------------
Ignore   Cancel   Ignore All
---------------------------

It is odd: TFrame descendants do not have a ClientHeight property!

If you press Cancel, then you get this error message.

Message

---------------------------
Error
---------------------------
Error creating form: Error reading TDioptreFrame.ClientHeight: Property ClientHeight does not exist.
---------------------------
OK
---------------------------

I did, and here is a reason why it can happen.
Read the rest of this entry »

Posted in Component Development, Delphi, Development, Package Development, QC, Software Development | 15 Comments »

Delphi – Frames as visual Components – don’t forget your Sprig!

Posted by jpluimers on 2009/07/16

I have been using Delphi Frames as visual components for quite some time now.
They make it really easy to use the Delphi IDE to visually design your component.
This makes the development process for creating visual components much easier and faster.

There are some things you need to watch when doing this, so I’ll devote a few blogs posts on this topic over the next couple of months.

A few of the things are:

  • When you put components on your frame, and later drop that frame as a component on a Delphi form or frame, the components are visible in the Structure Pane.
  • The Visible property is ignored at design time.
  • You need to watch resizing.
  • Frames do not have OnCreate and OnDestroy events.
  • Error messages about a missing ClientHeight property.
  • You can still drop other components on your frame.
  • … probably some more that I forgot right now…

The first blog on this series is about the first issue:

When you put components on your frame, and later drop that frame as a component on a Delphi form or frame, the components are visible in the Structure Pane.

The bad thing about this is that you can now delete the components on the frame using the structure pane.
This leads to all sorts of problems (mostly access violations).
Read the rest of this entry »

Posted in Component Development, Delphi, Development, Package Development, Software Development | 5 Comments »

yet another update to TFS 2008 Folder Comparison Filter for both C# and Delphi projects « The Wiert Corner – Jeroen Pluimers’ irregular stream of Wiert stuff

Posted by jpluimers on 2009/07/16

I just found out that in my updates to TFS 2008 Folder Comparison Filter for both C# and Delphi projects somehow some backslashes (\) were missing.

Oops, sorry :-)

These backslashes are important when excluding directories: if omitted, TFS thinks you want to exclude a filename in stead of a directory name (see Folder Comparison Filters).

It might be due to the HTML pasting issue that I explained in Including formatted sourcecode in WordPress.

Anyway, here is the correct one that has the backslashes at the right places:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj\;!objd\;!bin\;!lib\;!*.local;!*.identcache;!*.dcu;!__history\;!*.dsk;!*.~*;!*.stat;!*.drc;!*.map;!*.csproj.user;!*.vbproj.user;!*.csproj.webinfo;!*.vbproj.webinfo;!*.suo;!*.bpl;!*.dcp;!*.log;!*.lck

(Note these all should be on one line when pasting them).

–jeroen

Posted in .NET, C# 2.0, C# 3.0, Delphi, Development, Prism, Software Development, Source Code Management, TFS (Team Foundation System), WordPress | Leave a Comment »

C#/.NET – GetExecutablePath – borrowed a bit from the Delphi 2006 RTL

Posted by jpluimers on 2009/07/15

Somehow, at every client I need a function like GetExecutablePath.

Maybe you do too, so here is the code that I adapted a long time ago from the Delphi 2006 RTL:

using System;
using System.Diagnostics;
using System.Reflection;
namespace bo.Reflection
{
    public class AssemblyHelper
    {

        public static string GetExecutablePath()
        {
            // borrowed from D2006\source\dotNet\rtl\Borland.Delphi.System.pas function ParamStr():
            string result;
            Assembly entryAssembly = Assembly.GetEntryAssembly();
            if (null != entryAssembly)
            {
                result = entryAssembly.Location;
            }
            else
            {
                Process currentProcess = Process.GetCurrentProcess();
                ProcessModule mainModule = currentProcess.MainModule;
                result = mainModule.FileName;
            }
            return result;
        }
    }
}

Enjoy :-)

–jeroen

Posted in .NET, C#, C# 2.0, C# 3.0, Delphi, Development, Software Development, Visual Studio and tools | 2 Comments »

yet another update to TFS 2008 Folder Comparison Filter for both C# and Delphi projects « The Wiert Corner – Jeroen Pluimers’ irregular stream of Wiert stuff

Posted by jpluimers on 2009/07/09

Here is another update for the TFS 2008 Folder Comparison Filter for both C# and Delphi projects:

Exclude .bpl, .dcp, log and .lck files.

So then the search filter becomes this:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj;!objd;!bin;!lib;!*.local;!*.identcache;!*.dcu;!__history;!*.dsk;!*.~*;!*.stat;!*.drc;!*.map;!*.csproj.user;!*.vbproj.user;!*.csproj.webinfo;!*.vbproj.webinfo;!*.suo;!*.bpl;!*.dcp;!*.log;!*.lck

(Note: this all goes on one line; your web-browser probably wraps this over multiple lines, so you might need to undo that wrapping before pasting it in to TFS).

Have fun with it!

–jeroen

Posted in .NET, Delphi, Development, Software Development, Source Code Management, TFS (Team Foundation System), Visual Studio and tools | Leave a Comment »

Spoken @ DelphiLive ‘09, May 13-16, San Jose

Posted by jpluimers on 2009/06/11

I finally had time to get the downloads of the DelphiLive sessions I gave or participated in done.

During DelphiLive, my conference VM containing Delphi 2009 blue-screened, so I had to to use a production Delphi 2009 VM to demo, and get my conference stuff installed on it.
Luckily, I had recent copies of my materials with me.

Back home, work, more conferences and some construction work on our house held me back doing a restore of the conference VM, which I needed for doing a proper merge and upload of the materials.

At last, here are the downloads, see also the page Conferences, seminars and other public appearances:

Read the rest of this entry »

Posted in Component Development, Conferences, Delphi, DelphiLive, Designer Development, Development, Event, Package Development, Software Development | 1 Comment »

spoken @ Delphi Tage 2009 – download is on-line: Delphi power user: speed up your Delphi work

Posted by jpluimers on 2009/06/09

Last saturday, I spoke with my colleague Edwin van der Kraan at the German Delphi Tage 2009: one of the (or maybe just “the”) largest Delphi user groups events in Europe.

The session was titled “Delphi power user: speed up your Delphi work”.

Since we both speak German, the session was in German, and the slides in the download are mostly German too.

Rougly half of the session was done by demo’s and a few slides.
The rest was discussing with the public in what way they sped up their Delphi work, or what portions of their Delphi work they would like to speed up.

The room was packed with people form start to finish, and we had a lot of fun. Though the public learned a lot, even we had a few “aha” moments ourselves.

Some topics we covered were these:

Jeroen Pluimers [wahrscheinlich englischsprachig]
A lot of people use components to make their work easier. There are also tools and IDE enhancements that you can use to speed up your Delphi work. This session shows you how. We will cover new things introduced since Delphi 7 and two tools that make you really productive: Gexperts and ModelMaker CodeExplorer. The goal of this session is not to show you the vast possibilities, but to concentrate on things that you profit from most.
Some of these:
how do I write code faster
how do I write less code
which refactorings are really smart
how can I best change existing code
which changes always succeed, which ones fail and how can I adjust to these failures
how can I change the Tab Order of controls fast and accurately
what kind of breakpoint tricks are handy
how do I replace components
smart things with the Tool Palette
smart placement of your Windows
how do I find things in my project groups and on disk
how do I find my way in code that others wrote
This is not the final list, as this session has plenty of time for questions from the public. In addition, there will be room to discuss other tools. So: if there are things you do often and cost a lot of time: this is your chance to speak up!
  • The most usefull refactorings introduced since Delphi 7
  • Fun with the tool palette in non designer windows
  • Everything in Delphi is text based, including components copied to the clipboard
  • GExperts search, replace, replace components, ASCII chart and other smart stuff
  • Model Maker Code Explorer refactorings, class copying, interface implementation and a few other features
  • Beyond Compare magics

Some people (including me) took pictures during this event, you can find the combined list here.

We had a great time, not only because of the location (the ship Cap San Diego), but also because of the perfect organization by Daniel Wolf and Sabine Rothe.
Thanks to them for this wonderful event!

Posted in Component Development, Database Development, Delphi, Development, Package Development, Software Development | 2 Comments »

update to TFS 2008 Folder Comparison Filter for both C# and Delphi projects « The Wiert Corner – Jeroen Pluimers’ irregular stream of Wiert stuff

Posted by jpluimers on 2009/06/09

Last month I wrote about the TFS 2008 Folder Comparison Filter for both C# and Delphi projects; here is an update:

If you enable the generation of MAP files during compilation, you might not want to include them in your search filter.

Also, the .suo, .user and .webinfo extensions were missing (for an explanation of Visual Studio file extensions, see here and here), so then the search filter becomes this:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj\;!objd\;!bin\;!lib\;!*.local;!*.identcache;!*.dcu;!__history;!*.dsk;!*.~*;!*.stat;!*.drc;!*.map;!*.csproj.user;!*.vbproj.user;!*.csproj.webinfo;!*.vbproj.webinfo;!*.suo

Have fun with it!

–jeroen

Posted in .NET, C#, Delphi, Development, Prism, Software Development, Source Code Management, TFS (Team Foundation System), Visual Studio and tools | Leave a Comment »

TFS 2008 Folder Comparison Filter for both C# and Delphi projects

Posted by jpluimers on 2009/05/25

When using TFS (Team Foundation System) 2008 as a Version Control / Source Code Management system not only for your C#, but also for Delphi projects, this is a good filter string when using the ‘Compare Folders‘ function of TFS:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj\;!objd\;!bin\;!lib\;!*.local;!*.identcache;!*.dcu;!__history\;!*.dsk;!*.~*;!*.stat;!*.drc

This is the regular Folder Comparison Filter – the bold above is the addition and the link contains an explanation of the filter syntax:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj\;!objd\;!bin\

Hope this helps some of you in reducing the amount of clutter in the resulting comparisons :-)

–jeroen

Posted in .NET, C#, Delphi, Development, Software Development, Source Code Management, TFS (Team Foundation System) | 3 Comments »

Edited: Conferences, seminars and other public appearances « The Wiert Corner

Posted by jpluimers on 2009/05/15

I have edited the Conferences, seminars and other public appearances/ page and extended the list of conferences I have attended in the past including many sessions.

Topics covered in these sessions have been C#, Delphi, Databases, Linux, Kylix, debugging, Compact Framework, and much much more.

Let me know which sessions you’d like to see online first.

The list is far from complete, but it is another step into getting the list more accurate.

–jeroen

Posted in .NET, C#, C# 2.0, Component Development, Conferences, Database Development, Delphi, Designer Development, Development, Event, Firebird, InterBase, Package Development, Software Development, SQL Server, Visual Studio and tools, XML, XML/XSD | Leave a Comment »