Holger's Thoughts on Delphi

Sunday, July 30, 2006

Nice docs anyone?!

Normally, when you acquire a new version of a software product, you'll never insert the old cds into your drive ever again. However, D8 and all later versions had a wonderful new feature: less documentation - sorry for the sarcasm.

So, everybody got those nice D7 CDs out and opened those help files for VCL documentation. Today I even found a wizard on the net that makes it possible to use the old documentation files by default on CodeCentral: http://cc.borland.com/item.aspx?id=23948

Thanks go to community member Thomas Müller for that one!

I have not tried it myself yet, but I sure will get those old D7 CDs out of the cellar now ;)

C# and VCL.NET - yes, it is possible

A recent newsgroup post made me blog about this simple fact:
You can use VCL.NET in C#.

Period. It is possible. There are even examples available for free showing how it works.

My friend and Delphi-Guru Bruce McGee uploaded his C# example using VCL.NET classes to CodeCentral. You may download it for free. Registration in order to use Borland's CodeCentral Service might be necessary.

Click here to download it.

Sunday, July 23, 2006

ECO Pitfalls - an idea

I had two ideas this morning:
  • it would be nice to make all the ECO Pitfalls a little PDF that cross-references everything and has an index
  • it would be nice if people would be able to suggest their personal difficulties getting started or issues that keep bugging them, so I can include it in the list
I know that there is only one item so far, but I have much more to come. My time is rather limited at the moment as my diplma thesis is due in .... oh boy... less than three weeks.

So, item number 1 will definitely happen, however, number 2 is something you have to initiate! So, comment on this very blog post - be it other suggestions about my idea or ideas for more pitfalls.

Saturday, July 22, 2006

ECO Pitfalls #1: Synchronize ECO Code on idle

Yes, I like Nick's numbering approach so much, that I will number all my posts that belong into a certain category too.



I will try to deal with common pitfalls that you may encounter when developing ECO applications. As some of you might now, I have been doing some ECO sessions in Germany and from the questions that I got during those, I derive these posts.



This first post will deal with a feature called "Synchronize ECO Code on idle". What does it do? Well, basically it means that ECO generates the code for your model, while you design the model. Meaning: You drop a class on your model surface and the source code immediatelly gets the code for the class. If you remove the class, the source code will lose the class too.



Well, this all sounds very nice and as much as I love ECO in BDS 2006, but from my practical experience - and this is my opinion, nothing more - I have to say:


"Switch it off!"

It won't help, it will make things more complicated. You will run into issues when you rename classes or when you delete classes e.g.

So go to the Tools / Options... dialog and remove the check, so that it is switched off. You will, however, have to generate the code manually. This can be done by the buttons on top of the model view. I always use 'Regenerate ECO code' -never the update one.



Another common misconception is that 'Regenerate code' will delete all the lines of code you added manually to the code, e.g. in the constructor of your classes or to derive attributes. This is wrong. ECO will keep your code. It only touches code it has generated.

Wednesday, July 19, 2006

Mark E. gets nicked

Nick Hodges, Delphi Product Manager, will have Mark Edington as his guest in his second Radio Show today (-- for me it will be tonight).

Nick has done a great first show, talking about a lot of stuff regarding Delphi and DTG. Marco Cantu blogged about it. Simply go to www.delphifeeds.com to find Marco's summary.

Mark Edington is a member of the Delphi R&D team and this is a great shot to nag him about upcoming releases or stuff you would like to see in Delphi. As Mark is "Mr. Quality", as Nick refers to him, this is also a possibiltiy for the community to point out parts of the product that you think need some improvement regarding quality.

So be sure to join the broadcast, 2100 CET, that's 2000 UK time (or 9pm) also 2100 in the Netherlands (people who were in the chat the last time, will know why I mention this)
!!

Saturday, July 15, 2006

2 Days of Fun

Friday....moving the mouse, so the screensaver switches off... but ... Windows XP boot screen? I am quite sure, I left the PC on... and why is it stuck in the boot screen? ...

Well, nothing as sweet as pushing reset...10 seconds later...boot screen...same deal...

Reset... F8... last known good install ... and a surprise: icons of software I uninstalled about 5 months ago appeared ... so I cleaned up the desktop, all worked again. I also had to uninstall the software, even though it wasn't really installed.

Took me 3 hours. Ah, fine. I don't mind, once in a while. It was a MS update btw that was installed during the night and triggered the reboot. No idea what happened or what was installed exactly.

Before I went to bed, I did some backups, left the PC running -- as always.

Saturday...moving the mouse...the desktop is still there, but I need to install a new piece of software, which requires me to reboot... splash screen....still splash screen.... DAMN!

So, I tried the same approach as yesterday. No luck.

I tried using the recovery console. No luck.

Then... I used a repair install... it hangs when trying to "install devices"...repeat 5 times. Still...NO LUCK.

Final try, backing up the image from the HD I did yesterday.... oh well, here we go.

Let's check the HD for errors.. ok, there is an inconsistency in the NTFS table....

As I have a deadline for my diploma thesis, I start transfering all the data from my desktop PC to the laptop....

... 5 hours later... laptop has now the same data as the desktop PC, which runs and reboots again... no idea what triggered the NTFS error... no idea why it happens right now as I need to get work done...

I guess, we all have to deal with Murphy sooner or later...

Two days. Time well-spent.

But as a colleague told me today: "It's good, we love or job."

Take that for the weekend -- may you have a more exciting one than me.

Thursday, July 06, 2006

ECO III: Article

One of my articles was published on BDN. In the article you can learn how to use IOclServer, in particular how to handle the different results you might get.

Best thing: The article is available in English and German.

http://bdn.borland.com/article/33462 (EN)
http://bdn.borland.com/article/33498 (DE)

I hope the article gives you some insights you did not know about. Enjoy reading!