Pictures of the Delphi-Tage 2008#

The Delphi-Tage (Delphi Days) event in Günzburg, Germany were a success. Finally I had a few minutes to scan through my image stack and select a few for presentation online. Many happy faces - well with the offers available there, no wonder at all...

Wednesday, June 25, 2008 2:37:07 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Google AdSense


Save over 80% on Delphi - that is EIGHTY PERCENT - YES!!!#

Next weekend, on June 14th there are the German Delphi Days (www.delphi-tage.de). On this event speakers from Italy (Marco Cantù), CodeGear US (DavidI), CodeGear Germany and Embarcadero are coming, as well as many speakers from the German community.

Let's talk Delphi! Delphi! and Delphi!

And now, just coming in, they allow to sell older releases at prices never seen from CodeGear! BDS 2006 Architect SmallTeam Pack is being sold at 1.309 Euro (instead of 6.652 Euro), Single License for only 714 Euro (instead of 4.152 Euro). And many more products. Many other products like JBuilder 2007, the Turbo line, C++Builder 2006 and Books are for sale. Over 20 different products in over 150 combinations!

Those prices are valid on June 14th only!!! So do not miss them and come and visit the German Delphi Days, it is a once-in-a-life-time saver offer, as long as the products last!!! First come, first serve!

Thursday, June 05, 2008 2:55:36 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Starting BETA of our new product for HDR image generation#

Hello folks,

finally we will bring a new product on the market, completely developed in Delphi 2007 for Windows. The software will allow you to render HDR images from one or multiple single images.

If you do not know much about HDR imaging, I recommen the wikipedia entry: http://en.wikipedia.org/wiki/High_dynamic_range_imaging

Whom are we looking for? People with real interest in HDR imaging, who have some time to take images with their digital camera (DSLR recommended) and try to compose final HDR images using our software. If you have experience with other HDR software (like Photomatix, Artizen, FDRTools, ...) you probably can help us too ;-)

So, if you are interested in joining the beta, a few spots are still available. Write a short email to beta (at) fasthdr.com, put your name into the email and a short reason why you are interested. If you have samples of previously made HDRs online (like Flickr), include a link, but please, do not put them into the email.


Anyway, another thought. We use a few TMS components in this project. Many people ranted about my TMS posts and how I was making all of it bad - they should have read more properly. I only talked about one specific component, and I know there are many more, and quiet a few of them, I do like too ;-)

FastHDR uses following great TMS Components (among others): TAdvOfficePager, TAdvOfficeCheckBox, TSpinEdit, TAdvRangeSlider, TAdvTrackBar
Also, we use: ImageEn from HiComponents, TNT Components, DC RAW and ImageMagick

Monday, May 05, 2008 3:25:55 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

A little more on the TMS AdvToolBar components#

Yesterday I sent an e-mail to Bruno of TMS Software naming a few of the problems I've found with their AdvToolBar component. Today he wrote back to me stating, that most are fixed already. I'll wait for the next update on their website and let you know of the changes then. Further, I'll add a special page about the TMS components to my blog (coming with the next update of their components), where I keep track of the progress of their components.

I know, I have used harsh words, however, TMS Software - while being shocked - takes them seriously and works to improve their solution. I am excited to see what will come in the feature for use. I am sure, they will improve the form rendering on Vista too, this needs more work.

I am looking forward to see what comes :-)

Sunday, March 30, 2008 5:47:48 PM (W. Europe Standard Time, UTC+01:00) #    Comments [1]  | 

 

TMS Software#

Well, if you remember the old web site of TMS Software, you will be glad to learn, that they have relaunched their web site. It looks so much better, you must go and visit their site, it is well worth your time.

Go visit them now: http://www.tmssoftware.com/

@Bruno: sorry I did not answer your e-mail yet, but I will this weekend. I know I promised an faster response, but time did not permit at the moment.

Friday, March 28, 2008 11:59:10 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

About my last post...#

My last post about the VCL Ribbon Controls got me some heated feedback, mostly per e-mail, some as comments (not yet published, but I will, rest assured) and pointed out some more facts. About all those I will write here in the comming days some more.

Some wrote about the "waste of money" and asked me whether I had to write it in such strong words. Did I have to? Probably not. Will I change it? No, the word is out now. Am I sorry, just a little. I should have worded it differently, however, it is out now, and I will stand by it.

Will I do some more reviews about both controls. Yes, probably. It was pointed out to me, that the DevExpress controls violate the license as well. However not where, so I guess I have to do some more comparisons to the style guide. Bruno of TMS Software asked me about theirs, and I will answer him today. He, btw was the first to response to me (besides some Skype chats) and he was really friendly about it, though he would have preferred some up-front "warning" or talking about. I admit he has a point there and I'll think about such things in the feature.

The TMS solution has more optional features, that the DevExpress solution has not. I will talk about those as well. I'll also talk about some of the things written before, where TMS has solutions, but forces you as programmer to always watch out for those. It has advantages as well as disadvantages, but for my productivity I rate those disadvantages higher. If this post has some overall effect on the Ribbon Control of TMS, I will be happy to test it for them and I will be happy to blog about that as well.

Further, rest assured that I did not have an easy time writing that last post, but on the other hand I do not understand why so many get so worked up when someone does say what they think, even if it is not a positive mood. I am rather honest than shy. Sorry for hurt hearts.

Thursday, March 27, 2008 10:12:30 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

VCL Ribbon Controls - There is no fully acceptable solution available, or...?#

Currently I am playing around with different ribbon controls. Sadly, there is not one single solution for VCL Delphi developers, that brings (almost) all the features into our IDE - not one! THe two big solutions out there are

First, let's take a look at how MS Word 2007 displays the ribbon controls.

Ribbon Controls in MS Word 2007

Since Microsoft has patented the Fluent Office UI (as they call it), so if you plan to use it in your applications you have to agree to their license. Sadly, we are not allowed to discuss the license publicly, if you do not have agreed to it yourself. So all I write about it here, you have to read up on yourself. More information you'll find at: http://msdn2.microsoft.com/en-us/office/aa973809.aspx.

Anyway, whether you like the UI style or not, it is an eye catcher and imo once you get used to it, it is a really effecient way to access the applications functions.

Now, first a look at the solution from DevExpress.

VCL Ribbon Controls Solution from DevExpress

DevExpress has done a great job in bringing the Ribbon Controls into our VCL applications. Once you have taken the time to understand their logic in how to setup your UI, it is very easy to use. Their nice approach in how to use the Action components makes it very easy to divide your application code into UI handling and business logic.

However, if you take a look at the Word screen shot, you'll notice the red area in the title bar "Bildtools", those are part of the contextual tabs of the Ribbon UI design. They are highlighted to tell the user that their functions are directly related to the currently selected object. Sadly, DevExpress has not implemented this feature, one of the most usefull and sensible, into their VCL solution. The request to add this feature was entered on 11/20/2006 and its state (currently: Accepted - Release TBD) has not changed since 11/30/2006.

Now, let's look at the TMS solution:

VCL Ribbon Controls Solution from TMS Software

Imho, this is a really bad implementation of the Fluent Office Ribbon UI. First, you see the frame of the application - that is as "good" as you can get it with their solution - and this really looks terrible. Next, they are violating the Ribbon UI license in multiple areas, which, sadly, I am not allowed to discuss here. Send me an email if you have specific questions about that, we'll work out a way to talk about it. However, since you have to agree to the license in order to use it in your application, you automatically violate it as soon as you use the TMS solution (example: look at the bottom of the ribbon control, look at the [I] access key hint, ...) - so you must not use it.

Whether, or not, this is part of the license, I can talk about one part of the TMS solution, which is bad. Once the window becomes to small to fit all groups (such as Clipboard, Font - Paragraph, Styles, ... in the screen shot above) of the ribbon page, they collapse in a way that the user does not see, which group is which - no labels, no icons, ... Your users will hate you!

Besides this point, imo, the design time usage of the AdvToolBar is horrible. You have to exactly place every component - they should be placed automatically. I do not want to align them by hand, the should flow! I do not have to align them in normal action menu bars either, just arrange their order.


So, if you are looking for a VCL Ribbon Control, currently I would suggest to use the Devexpress solution. However, be aware that they do not support contextual tabs currently, and probably never will (please, let me be mistaken in this point!). If you need those, imo you are out of luck, because you imo you should leave your fingers from the TMS solution, that is wasted money.

Well, that said. If you know of another VCL Ribbon Control, which can be used commercially, let me know. I'll check it out!

Wednesday, March 26, 2008 2:08:05 PM (W. Europe Standard Time, UTC+01:00) #    Comments [8]  | 

 

Delphi Win32 Project Localizer#

Well, it is available since about 3 weeks now and I had some feedback already. Now, I would like you guys to take a look at it and let me know what you think. There is a small update in the pipeline, but that is not available yet. A short product description and a video are on the project site: http://www.wischnewski.tv/en/products/dw32pl.html

Start localizing your applications. Demos come with the installer - the product is free for personal and commercial (not governmental) use.

Friday, March 21, 2008 4:26:46 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

More EKON Spring 2008 Papers#

Since Sebastian Gingter (a moderator of the Delphi-PRAXiS) is not on the Delphi-Feeds list, and he just uploads(!) his papers right now, I am giving you a pointer over to his blog. His papers are on WMI (Windows Management Instrumentation) and Patterns (MVVM), in German, too.

Entries:

Thursday, February 28, 2008 5:54:40 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

EKON Spring 2008 - Papers Online#

My conference sessions are all done, so the papers are ready for download. Go to my Conference Papers page and download them as you like. They are German only this time.

Thursday, February 28, 2008 5:28:42 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

BFWC has arrived - bless the day!#

Just a few minutes ago, Daniel Magin has published his BlackFish WebConsole. Go, download it, check it out and use BlackFish SQL now. The WebConsole is available for free!

Wednesday, February 27, 2008 5:45:05 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Parameters of NT Services#

Today an interesting question came up in the Delphi-PRAXiS. One of our users asked how to parse parameters sent to a NT service application. The good old trusted version of normal VCL applications does not work:

for I := 1 to ParamCount do
  Foo(ParamStr(I));

So a quick dive into the Delphi 2007 source code revealed an interesting property of the TService class, called Param.

for I := 1 to ParamCount do
  Foo(Param[I]);

So if you ever want to run parameterized services, that is the way to get them ;-)

Monday, February 25, 2008 10:42:13 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

EKON Spring - Starts Today#

Well, I just hope that the EKON has a good start today and all of you, there already HAV FUN! The first two days are centered on Workshops mostly on basic OOPP/Delphi concepts. EKON Spring itself is centered around Delphi concepts, rather than all things surrounding development with Delphi.

My Session are on Wednesday Logging with SmartInspect and on Thursday Application Localizing using my new tool.

Tomorrow I will take off here and come to Frankfurt - I am looking forward to see you all there!

Monday, February 25, 2008 8:45:23 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

EKON Spring - Thursday Session#

At the EKON Spring, I'll present a new solution for multi-language VCL applications. It allows you to translate all forms and resource strings in an external application, comes with a command line tool for updating strings. Every language resource can be deployed seperatly, the application can be deployed without any additional resources at all - in the original developer language.

In a second step, I'll probably will not show that at the EKON Spring yet, you can save translations of forms and resource units for later projects to use.

Stay tuned for more, I'll present that here after the EKON for download ;-)

Best of all, there will be a fully usable version for free.

Sunday, February 17, 2008 10:10:33 PM (W. Europe Standard Time, UTC+01:00) #    Comments [5]  | 

 

Delphi Days 2008 - Germany, Austria, and Switzerland#

Finally, we have announced the official date of the upcoming Delphi Days 2008, the 4th time the German speaking community will meet for sessions, talks, and get-togethers. This year we will meet in Günzburg, southern Germany to better accomodate Delphi developers coming from Austria and Switzerland as well.

While planing is still in progress, please, tell us what you would like to see, hear, and do at the next Delphi Days. Your suggestions are welcomed and needed to make it a memorizable event, once again. This year, we want to go back to the roots and more emphasize on the community idea of the whole event.

Let's meet in Günzburg on June 14th!

Tuesday, February 05, 2008 5:24:33 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Quick Font Review - Update#

The Update first for the application is done. Your ideas as well as mine all made it into the application.

New features:

  • Preview any True Type Font File not installed on your system
  • Install the previewed files on the fly (if you have administrative rights)
  • Filter view fonts by their styles (decorative, modern, serif, sans-serif, script, monospace, proportional)
  • Get detailed information about the fonts
  • Enumerate dependend fonts (eg: character set sub-font, real bold/italic/etc. versions)
  • Get a quick preview of each font in list

Font Review Application
Font Review Application

You can download the application from here (1,6 MB, ZIP, InstallAware Installer, Digitally Signed). If you have the previous version installed, simply run this setup. It will automatically uninstall the old version prior to installing the ppdate.

While the last version did not need an installer, this version does in fact need it. To accomodate the Windows Vista UAC, the installer is packaged in an out-of-process COM server, the only way to request elevation without requiring administrative rights to simply view/preview fonts.

Any thoughts, any suggestions? Please, let me know ;-)

Thursday, January 31, 2008 4:17:12 PM (W. Europe Standard Time, UTC+01:00) #    Comments [1]  | 

 

More on my Windows Font Preview Application#

I got some feedback from you guys via email on the Windows Font Preview Application, I wrote about yesterday. I like that *g*

So, I decided to spend some more time on it and I ask you for input. What features would you like to see? Following a list of features I am thinking about implementing:

  • Preview font files without installing them on the system, permanently
  • Allow for filtering fonts when looking for a special one for your next essay
  • Show some detailed information about the installed font
  • Enumerate dependend fonts (eg: character set sub-font, real bold/italic/etc. versions)
  • Quick preview of all fonts in list

What (else) would you like? Drop me an email or leave a comment here.

Wednesday, January 30, 2008 6:29:22 PM (W. Europe Standard Time, UTC+01:00) #    Comments [2]  | 

 

The quick brown fox jumps over the lazy dog#

You probably know this text from the built in Windows font preview application.

The quick brown fox jumps over the lazy dog

Well, it is nice to see a font, when you scroll through them. Many applications out there allow to easily few multiple fonts at once. But all free tools I know of lack the possibility to enter your own (unicode) text to review a font. Well, today I needed just that and I let you all use it for free ;-)

It features:

  • Font Size (6 to 128 pt)
  • Bold, Italic, and Underline
  • Quality: default, draft, proof, aliased, non-aliased, and ClearType

Font Review Application
Font Review Application

To get the application, go to the update page.

Tuesday, January 29, 2008 4:40:09 PM (W. Europe Standard Time, UTC+01:00) #    Comments [4]  | 

 

DSDT is now Delphi-Treff#

This week the administrators of www.dsdt.info (Delphi-Source, der Delphi-Treff) relaunched the web site with a new design. The new side reminds me of a Web 2.0 portal just from the looks of it. With the relaunch of their site, they chose a new name, simply www.Delphi-Treff.de. It is one of the leading German language Tutorial sites on the web for Delphi developers.

If you know German, check it out.

Tuesday, January 15, 2008 2:55:35 PM (W. Europe Standard Time, UTC+01:00) #    Comments [1]  | 

 

Forgot your connection string?#

I always forget to post it to my blog, so finally here it is. Since two years I am using this page and it helps with those crazy connection strings. When you need to find the right one for your database, check it out at www.connectionstrings.com.

Thursday, January 10, 2008 10:52:15 AM (W. Europe Standard Time, UTC+01:00) #    Comments [2]  | 

 

Vista, RAD Studio 2007, and Visual Studio 2008 - OOPS#

Well, as I've written before, I have reinstalled my work machine. Still the same setup as in the last post, basically it is just Windows Vista Ultimate (running in a domain), 2007 Office System, and Visual Studio. First, I have installed Visual Studio, then Office and last the RAD Studio. A few minor tools along the way.

When working in Visual Studio on ASP.NET Applications, I could not use the designer at all. Using the Source view of ASPX files worked fine. When switching to Split- or Design view, the editor would freeze and nothing else would happen. I could close the tab and keep on working in Source view. Not more on ASPX-files. While this is fine most the time, I sometimes would just like the designer.

I reinstalled (repair function) the whole Visual Studio 2008. And it got better, well almost. When switching into Split- or Design view I could see the page, but every control would be causing the following error.

Error Creating Control - Panel1
The type initializer for 'Microsoft.Web.Design.ExtenderInformationServiceProvider' threw an exception.

Or it would tell me, that a control with the name of Panel1 exists already. Whichever error it liked to show. Well, after searching the internet for about an hour I found a solution that seemed to make no sense, so it should work. So I did just that:

  • Uninstall the .NET Framework 3.5
  • Reboot
  • Reinstall the .NET Framework from the Visual Studio DVD
  • Reboot
  • Run Visual Studio and be happy

It works! So if you have a similar problem, try your luck with un- and reinstalling the .NET Framework 3.5.   

Monday, January 07, 2008 1:14:19 PM (W. Europe Standard Time, UTC+01:00) #    Comments [3]  | 

 

Your project does not have a type library...#

I've used the christmas-new-year-time to reinstall my work station. One year of abuse, no images, etc. has taken its toll and it was time to do something about just that. After I had reinstalled my most needed applications on-top of Windows Vista Ultimate (Visual Studio 2008, RAD Studio 2007, InterBase 2007, 2007 Office System, Acrobat Reader and 7-zip) I pulled my source codes of our largest project. We needed an addition to one of the libraries, so I loaded it into the Delphi IDE and wanted to go to the type library editor (it is a ActiveX/COM server library).

Well, the menu point was grayed out. Delphi did not let me know why it did not want to load the type library, nor did it show any error message. After experimenting a little, I found out, that I could load about half the COM server projects just fine, while others did not let me load the type library editor either. No error messages, no warnings, and all would compile just fine.

Later I tried to load the TLB file directly into Delphi and I got the message, that it cannot be loaded, because a dependent ActiveX library is not installed. So I started registering the other type libraries of the project, one by one, wondering why - I never had to do that before - and it did not help in any way. Later I had an idea and checked upon my MS XML installations and found the MS XML 3, MS XML 5, and MS XML 6 were installed, MS XML 4 was missing, however. After installing MS XML 4 I could load all projects again and edit the type libraries as well.

So please, CodeGear, start giving us meaningful error messages in this case too. I will have to come up with a example showing the problem, but how can I let them know how really important such issues can be...?

Anyway, happy new year to all of you out there!

Friday, January 04, 2008 3:11:32 PM (W. Europe Standard Time, UTC+01:00) #    Comments [4]  | 

 

Thank you for all you've done for us#

John Kaster informed us today of the passing of Robert Marquardt. Robert was a well respected member of the Delphi-PRAXiS and we will remember him in the fondest ways. He has done much for the Delphi Jedi Project and I hope the project will find a new person, who will step into his steps and help it prosper the way it should.

I have met Robert at various Delphi happenings and it has been a pleasure talking to him, always. I hope you have a great time ahead of you. My sincere sympathies for his family and closests friends, I have just written short messages with him and had small talks only, but they were a pleasure, always.

Thank you again Robert, for all you have done for me, the Delphi-Community of Germany and the Delphi developers world wide. It hasn't been easy always, especially in the last years, but you have been there for us, THANKS!   

Wednesday, January 02, 2008 1:55:45 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Working with the Castalia Delphi Parser#

Last week I asked for a list of Delphi parsers/lexers, to analyze Pascal/Delphi files. One of the solutions named, and by far the best one, was the Castalia Delphi Parser. After playing with it a while I started to see what it really can do. While it is not the easiest to use, it goes a long way. However, I ran into some wall. Files like Windows.pas and System.pas from the original Delphi distribution (checked against Delphi 2007) cannot be parsed with it.

For Windows.Pas, it stops on the declaration of the type DWORD.

type
{ Translated from WINDEF.H }

  WCHAR = WideChar;
  {$EXTERNALSYM WCHAR}
  PWChar = PWideChar;

  LPSTR = PAnsiChar;
  {$EXTERNALSYM LPSTR}
  PLPSTR = ^LPSTR;
  {$EXTERNALSYM PLPSTR}
  LPCSTR = PAnsiChar;
  {$EXTERNALSYM LPCSTR}
  LPCTSTR = PAnsiChar;
  {$EXTERNALSYM LPCTSTR}
  LPTSTR = PAnsiChar;
  {$EXTERNALSYM LPTSTR}
  LPWSTR = PWideChar;
  {$EXTERNALSYM LPWSTR}
  PLPWSTR = ^LPWSTR;
  {$EXTERNALSYM PLPWSTR}
  LPCWSTR = PWideChar;
  {$EXTERNALSYM LPCWSTR}

  DWORD = Types.DWORD;
  {$EXTERNALSYM DWORD}

In System.pas it stops, because it cannot handle {$IFDEF} blocks very well. When coming to the second time when unwind is declared (this time for Linux) it stops, because it needs a new const before it.

const
{$IFDEF MSWINDOWS}
  unwind = 'unwind.dll';

type
  UNWINDelphi-PRAXiSROC  = Pointer;
function UnwindRegisterIPLookup(fn: UNWINDelphi-PRAXiSROC; StartAddr, EndAddr: LongInt; Context: Pointer; GOT: LongInt): LongBool; cdecl;
  external unwind name '__BorUnwind_RegisterIPLookup';

function UnwindDelphiLookup(Addr: LongInt; Context: Pointer): UNWINDelphi-PRAXiSROC; cdecl;
  external unwind name '__BorUnwind_DelphiLookup';

function UnwindRaiseException(Exc: Pointer): LongBool; cdecl;
  external unwind name '__BorUnwind_RaiseException';

function UnwindClosestHandler(Context: Pointer): LongWord; cdecl;
  external unwind name '__BorUnwind_ClosestDelphiHandler';
{$ENDIF}
{$IFDEF LINUX}
  unwind = 'libborunwind.so.6';

Do you have a solution for those problems, or do you now another parser/lexer which will help me along.

Thanks and a Happy New Year,
Daniel

Friday, December 28, 2007 4:34:08 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Searching your Delphi files...#

Yesterday, I asked you guys for a list of Pascal/Delphi parsers. Today I ask you how I should really use it.

What I am going to do...

I am currently writing a indexing filter, that will index your Delphi/Pascal files with the Windows Search Desktop, which comes with MS Windows Vista, and is available for download for Windows XP. The same library can be used with the old indexing service of Windows 9X/ME/200X.

Why I am doing this...

Because I like to find my libraries when I need them. Over the years I have created literally thousands of units and sometimes it just takes a while to find a simple helper function I have written back then... The Windows Desktop Search is great, when you feed it with optimized data. This is what I am going to do for your Pascal/Delphi files.

Does this really work...

You remember ever searching your files and not finding them, though you just know they are there. Well, this is because the Indexing service needs to be told what to index, where to index and how to index. Once you do this, yes, it works, always! I am going to help you with the what and the how for the Pascal files. You just have to determine the where.

How a plan to implement the idea (for now)...

I simply thought I'll parse the interface part of all units (all parts for .dpr and .inc files) and index the name of all classes, types, methods, functions, procedures, properties, constants, variables as keywords. Further I would index the whole declaration of those as well as comments for full-text search.

This way you can search the declarations and the comments of your files on the fly and literally instantly.

How would you implement the idea...

What else should I index - or how should I index those data? Any comments, ideas, etc. are very welcome. I'll plan to release the first beta in January. So let me know what you want.

Thanks for reading, now send me a message ;-)

 

Sunday, December 23, 2007 4:47:09 PM (W. Europe Standard Time, UTC+01:00) #    Comments [8]  | 

 

I am looking for a basic (or good) Delphi lexer#

Well, I know about DGrok, which seems to be a great tool. However, it is written all in C# and therefore all in .NET only. For a upcoming project, which I want to make open source once finished, I need a lexer, which is written in native Pascal/Delphi. It does not need to be perfect, however, it should return all data of the interface part in units, and it should analyze Delphi-PRAXiSR-Files as well.

The lexer (maybe a simple parser suffices) must be open source and come with just about any license out there, though I prefer MPL over (L)GPL any day.

Anyone with a good hint out there? Thanks!

P.S.: Merry Christmas and a happy new year.

Saturday, December 22, 2007 4:10:15 PM (W. Europe Standard Time, UTC+01:00) #    Comments [5]  | 

 

More on the Zoom and SuperZoom#

My last post was on the Zoom-Feature of the Delphi 2007 IDE. During the last hours I played around a little with it. One of the comments mentioned the option SuperZoom, which is even nicer. However, in a multi-monitor setup, SuperZoom always places the editor on the main monitor, which is not always the one I want to work on. So, it is nice to have, but I'll stay with the Zoom option for now, this one works as expected.

Thursday, December 13, 2007 12:25:17 PM (W. Europe Standard Time, UTC+01:00) #    Comments [2]  | 

 

Full Screen Editor in Delphi 2007 IDE#

Alfonso, a member of the Delphi-PRAXiS has seen an undocumented feature in an presentation and shared it with the community. Since many of you don't read the German forum or may just miss it in the wealth of information flowing through the Delphi-PRAXiS, here is a very nice registry hack.

Navigate to your registry key [HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Editor] and create a string entry with the name Zoom and the Value Zoom.

Now, when double clicking on the tab of the editor it will go to the full width of your screen. Nice feature!

Sorry that I write only rarely lately, but this is due to me doing lots of web development during the last weeks and will change after the holiday season, again.   

Wednesday, December 12, 2007 12:51:41 PM (W. Europe Standard Time, UTC+01:00) #    Comments [5]  | 

 

Way to go, CodeGear#

I know, it is a little late, but last week was stuffed with work and I did not have time to blog anything. So, all I wanted to say "Well done, CodeGear," thanks for making CodeRage II free.

Now folks, it is time for a real life conference from CodeGear - yes, we are willing to pay for that and yes, it costs much more than USD 150 for a online conference, but it is all about the face-to-face meetings...

Anyway, you all have fun attending CodeRage. Next week I'll use to prepare my Delphi CodeCamp session on Windows Vista, write a few articles and do more web development. Then I'll continue working on my localization solution, which I am going to present at the EKON Spring 2008 edition, so stay tuned, much stuff coming up soon...   

Sunday, November 25, 2007 9:10:08 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

More on SmartInspect#

I did not get around to write more on comparing SmartInspect and CodeSight, though there are a few more things I want to name here - so stay tuned on that. However, if you are interested in learning more about SmartInspect, join me...

I will talk about SmartInspect at the upcoming EKON 12 Spring, next February in Frankfurt/Germany. In this session I will show you how to use SmartInspect in your applications, how to pass objects, how to inspect and watchs values over time, and most importantly give you a strategy on how to implement it into an already existing application - like an afterthought. But be warned, planing to use such a tool upfront is more sensible ;-)

Track description (in German)

Sunday, November 25, 2007 8:55:31 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Creating your own interactive Welcome Page#

Often, I am asked how to implement something similar to the CodeGear RAD Studio (aka BDS) Welcome Page. Well, to be honest, I didn't know myself. All I have done for Borland/CodeGear so far, was implementing the whole HTML and JavaScript side, as well as XML and XSL. But this is all open source, and can be found in the $(BDS)\Welcomepage folder. No big secrets here.

Sample application acting on button click in HTML
Sample application acting on button click in HTML

But what you really want to know is, how to give HTML/JavaScript access to your application or how to implement your own URL, such as bds:/default.htm. Well, I took the time and investigated just that, today. And let me tell you, it is easy, once you know where to look. You need to know two interfaces:

  • ICustomDoc - allows you to assign your own document handler for the web browser instance
  • IDocHostUIHandler - allows you to return an interfaced object, that will be accessible from JavaScript and to manipulate the URL requested (as well as many other functions)

First, let me give you the interface declarations, you need:

type
  PDOCHOSTUIINFO = ^TDOCHOSTUIINFO;
  TDOCHOSTUIINFO = record
    cbSize: ULONG;
    dwFlags: DWORD;
    dwDoubleClick: DWORD;
    chHostCss: POleStr;
    chHostNS: POleStr;
  end;

  IDocHostUIHandler = interface(IUnknown)
    ['{bd3f23c0-d43e-11cf-893b-00aa00bdce1a}']
    function ShowContextMenu(const dwID: DWORD; const ppt: PPOINT; const CommandTarget: IUnknown; const Context: IDispatch): HRESULT; stdcall;
    function GetHostInfo(var pInfo: TDOCHOSTUIINFO): HRESULT; stdcall;
    function ShowUI(const dwID: DWORD; const pActiveObject: IOleInPlaceActiveObject; const pCommandTarget: IOleCommandTarget; const pFrame: IOleInPlaceFrame; const pDoc: IOleInPlaceUIWindow): HRESULT; stdcall;
    function HideUI: HRESULT; stdcall;
    function UpdateUI: HRESULT; stdcall;
    function EnableModeless(const fEnable: BOOL): HRESULT; stdcall;
    function OnDocWindowActivate(const fActivate: BOOL): HRESULT; stdcall;
    function OnFrameWindowActivate(const fActivate: BOOL): HRESULT; stdcall;
    function ResizeBorder(const prcBorder: PRECT; const pUIWindow: IOleInPlaceUIWindow; const fRameWindow: BOOL): HRESULT; stdcall;
    function TranslateAccelerator(const lpMsg: PMSG; const pguidCmdGroup: PGUID; const nCmdID: DWORD): HRESULT; stdcall;
    function GetOptionKeyPath(out pchKey: POleStr; const dw: DWORD): HRESULT; stdcall;
    function GetDropTarget(const pDropTarget: IDropTarget; out ppDropTarget: IDropTarget): HRESULT; stdcall;
    function GetExternal(out ppDispatch: IDispatch): HRESULT; stdcall;
    function TranslateUrl(const dwTranslate: DWORD; const pchURLIn: POleStr; out ppchURLOut: POleStr): HRESULT; stdcall;
    function FilterDataObject(const pDO: IDataObject; out ppDORet: IDataObject): HRESULT; stdcall;
  end;

  ICustomDoc = interface(IUnknown)
    ['{3050f3f0-98b5-11cf-bb82-00aa00bdce0b}']
    function SetUIHandler(const pUIHandler: IDocHostUIHandler): HRESULT; stdcall;
  end;

Once you figured those out, the rest is straight forward. Create a new VCL application and place a TWebBrowser component on your form. Before you can assign your own object (in the sample, it is the form itself) you have to load some document. I recommend loading about:blank, that is fast and works always.

procedure TForm8.FormCreate(Sender: TObject);
begin
  // initialize web browser
  wbbDisplay.Navigate('about:blank');
  while wbbDisplay.Busy do
    Application.ProcessMessages;

  // we have to handle some Interface requests, register this form as IDocHostUIHandler
  (wbbDisplay.Document as ICustomDoc).SetUIHandler(Self);
end;

Implement the IDocHostUIHandler interface in your form. Next you need to implement two methods:

  • GetExternal - allows you to return an interfaced object (IDispatch), which you can access from JavaScript
  • TranslateUrl - allows you to manipulate the URL before the web browser will attempt to load the file
  • Return for all other methods either E_NOTIMPL or S_FALSE according to MSDN documentation.
function TForm8.GetExternal(out ppDispatch: IDispatch): HRESULT;
begin
  ppDispatch := TMyApp.Create as IDispatch;
  Result := S_OK;
end;

function TForm8.TranslateUrl(const dwTranslate: DWORD; const pchURLIn: POLESTR; out ppchURLOut: POLESTR): HRESULT;
var
  NewURL: WideString;
begin
  if WideSameText(Copy(pchURLIn, 1, 6), 'app://') then
  begin
    NewURL := ExtractFilePath(Application.ExeName) + Copy(pchURLIn, 7, MaxInt);
    if NewUrl[Length(NewURL)] = '/' then
      SetLength(NewUrl, Length(NewUrl) - 1);
    ppchURLOut := POLESTR(NewURL);
    Result := S_OK;
  end
  else
  begin
    Result := S_FALSE;
  end;
end;

Now, you need to add a type library to your project. Once done, add an automation object (not COM-Object) to your application. This object you will return from the method GetExternal (see above, TMyApp there). Implement your methods as needed and you are done. In the code above, the application will change all URLs starting with app:// to load the files directly from the application folder. For some reason, web browser seems to add an additional slash (/) to the file requested, which has to be removed (see code TranslateUrl).

From JavaScript, you call your applications interfaced object by using the external. statement. If you name your method TestMe, you call it with external.TestMe(); from JavaScript.

That's it already. The sample projected can be downloaded (ZIP, 280 Kb).

Monday, November 12, 2007 6:20:28 PM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

CSS: Have A Real Page Footer#

Often we are challenged in life, especially when it comes to web page design. And when you want to have something "normal" as a page footer, which will always display at the bottom of the page, but never before the end of the content, you are running into THE short coming of the CSS definitions.

It is simply not designed to fit this need. However, one smart guy found a working solution, at least as long as you have a defined height for it.

Well, here you go, use it in your ASP.NET projects :)

Monday, November 12, 2007 11:19:23 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Security fixes for OpenSSL with Indy Libraries#

Arvid Winkelsdorf of the digivendo GmbH has published on the Delphi-PRAXiS a security patch for using OpenSSL with the Indy libraries. The original source code has some quiet dangerous buffer overflow security risks. He allowed me to post them here, so that you can get them without having to register at the Delphi-PRAXiS.

Short Installation Instructions

Copy header files into your programm folder to ensure use of the Delphi compiler. Rebuild your project. Copy the files libeay32.dll and libssl32.dll (old name ssleay32.dll) into your application folder.

Since Indy 9 and Indy 10 are differently structured, you have to rename either IdSSLOpenHeaders9.pas or IdSSLOpenHeaders10.pas in IdSSLOpenHeaders.pas to make the fix work. Both files are in the download package.

Arvid will probably start his own blog soon and will support the Indy team in this specific area. Let's see what he will do to support us Indy-lovers. Thanks Arvid.

Download Patch (ZIP, 800 Kb)

Friday, November 09, 2007 11:49:45 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  |