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,854 other subscribers

Archive for the ‘Delphi’ Category

Breaking changes in .NET 4.0

Posted by jpluimers on 2010/04/14

Every major release of software will bring great new stuff, but the price of upgrading from a previous version is that some stuff will break.

.NET 4.0 brings a lot of nice stuff as well, but there are a few things that break.

There is a nice Breaking changes in .NET 4.0 – Stack Overflow article on this.

The article is now a community wiki, and refers to these pages:

Since the article is a community wiki, expect it to be updated over time.

I wonder what these changes will bring (and break) in the upcoming Delphi Prism release (the datasheet is out now, the product should be out before the end of may).

–jeroen

PS:

If you do not have an MSDN subscription, but still want to see if things break for you, try one of these:

Scott Guthrie has a nice post on the bells and whistles of VS2010.

Posted in .NET, ASP.NET, C#, C# 4.0, Delphi, Development, Prism, Software Development, Visual Studio and tools, Web Development | 1 Comment »

Visual Studio 2010 RTM will be available on MSDN at 10AM PST *today*

Posted by jpluimers on 2010/04/12

For MSDN subscribers:

Visual Studio 2010 RTM will be available on MSDN around these times:

  • 10:00 PST
  • 13:00 EST
  • 17:00 UTC

Other time zones: see this Worlclock link.

Sources:

Posted in .NET, Delphi, Development, Software Development, Visual Studio and tools | Leave a Comment »

Classic UI mistake – OK/Cancel buttons for a Yes/No question.

Posted by jpluimers on 2010/04/12

Just unlinked/linked my DropBox account because of some synchronization issues, then got this messagebox:

—————————
Dropbox
—————————
There is already a folder in your My Documents folder called ‘My Dropbox’. Do you want to merge all the existing files in that folder into your Dropbox?
—————————
OK   Cancel
—————————

Sometimes I wonder if programmers ever are going to learn to get the basic UI things right :-)

(This was in version 0.7.110.0 of dropbox)

–jeroen

PS:
I absolutely love the functionality of dropbox, and to their credit: they do get most of their UI right.

Posted in .NET, Delphi, Development, Software Development, UI Design | 7 Comments »

Non-English error messages…

Posted by jpluimers on 2010/03/17

Sometimes you wish there was some universal translation table to get the English error messages.

Just got this at a client:

Project Foo.exe raised exception class EOleException with message ‘De bewerking moet worden uitgevoerd op een query die kan worden bijgewerkt‘.

The English translation of the error message is “Operation must use an updateable query” (which is also wrong: the query is indeed updateable).
But not knowing that English translation beforehand, how do you find out the cause?

Read the rest of this entry »

Posted in Access, Database Development, Delphi, Development | 2 Comments »

Formatted sourcecode in WordPress now supports even more languages

Posted by jpluimers on 2010/02/15

I just found out that the sourcecode tag in WordPress now supports even more languages.

This is the list of languages is below, it contains links to Wikipedia for each language.
Starred ones (bold and hyperlinks in this theme are the same ) are new since my post last year.

This is a follow up on the original article Including formatted sourcecode in WordPress « The Wiert Corner – Jeroen Pluimers’ irregular stream of Wiert stuff.

–jeroen

Posted in .NET, C#, CSS, Database Development, Delphi, Development, Encoding, Java, Software Development, SQL Server, Web Development, WordPress, XML, XML/XSD | Tagged: | 2 Comments »

Web means Unicode

Posted by jpluimers on 2010/02/12

Google published an interesting graph generated from their internal data based on their indexed web pages.Encodings on the web

A quick summary of popular encodings based on the graph:

  1. Unicode – almost 50% and rapidly rising
  2. ASCII20% and falling
  3. Western European* – 20% and falling
  4. Rest – 10% and falling

Conclusion: if you do something with the web, make sure you support Unicode.

When you are using Delphi, and need help with transitioning to Unicode: contact me.

–jeroen

* Western European encodings: Windows-1252, ISO-8859-1 and ISO-8859-15.

Reference: Official Google Blog: Unicode nearing 50% of the web.

Edit: 20100212T1500

Some people mentioned (either in the comments or otherwise) that a some sites pretend they emit Unicode, but in fact they don’t.
This doesn’t relieve you from making sure you support Unicode: Don’t pretend you support Unicode, but do it properly!

Examples of bad support for Unicode are not limited to the visible web, but also applications talking to the web, and to webservices (one of my own experiences is explained in StUF – receiving data from a provider where UTF-8 is in fact ISO-8859: it shows an example where a vendor does Unicode support really wrong).

So: when you support Unicode, support it properly.

–jeroen

Posted in .NET, ASP.NET, C#, Database Development, Delphi, Development, Encoding, Firebird, IIS, InterBase, ISO-8859, ISO8859, Prism, SOAP/WebServices, Software Development, SQL Server, Unicode, UTF-8, UTF8, Visual Studio and tools, Web Development | 7 Comments »

Delphi – 2010/2009 code-completion changes making life harder..

Posted by jpluimers on 2010/02/01

I’m trying to create a list of code completion changes in Delphi 2009 and 2010 that make life a harder (as compared to Delphi 2007).
The reason is that I want to post a summary in a QC report, so they get fixed.

Please comment below to add your own.
I’ll summarize in a week or 2.

These are the ones I found:

  1. When the code completion list is visible, pressing the Enter key would select the topmost item and complete it
  2. When you press ctrl-space to activate the code completion list, and you had already typed part of an identifier, the topmost item would match this identifier

I have the idea that this is caused by the fact that when the code completion list becomes visible, the topmost item in the list is not automatically being selected in Delphi 2009/2010, where in Delphi 2007 (and before) it was.

It seems you now need to press the down-arrow once to select it.
That means one action extra, while the code completion list has always meant to be a productivity boost.

Please comment….

–jeroen

Posted in Delphi, Development, Software Development | 21 Comments »

Validate XML with XSD in .NET and native MSXML – big difference in string maxLength validation with newlines (samples in C# and Delphi)

Posted by jpluimers on 2010/01/19

Recently, I had an issue while validating XML with XSD: validation in .NET using the built in classes in the System.XML namespace, and validation in native Windows using the COM objects exposed by  MSXML version 6 (which incidentally ships with the .NET 3.0 framework).

Some documents validating OK in .NET did not validate well with MSXML.

I’ll show my findings below, and try to explain the difference I found, together with my conclusions.
The main conclusion is that MSXML version 6 has a bug, but I wonder why I can’t find much more information on it.

Since there is not so much ready to use for validating XML by XSD in .NET and native, I’ll include complete source code of command-line validations applications for both platforms.
.NET source code is in C#.
Native source code is in Delphi.
Read the rest of this entry »

Posted in .NET, C#, C# 2.0, C# 3.0, Delphi, Development, Software Development, Visual Studio and tools, XML, XML/XSD, XSD | 4 Comments »

Delphi – HIGHCHARUNICODE directive (Delphi) – RAD Studio

Posted by jpluimers on 2010/01/18

I forgot about it, but this thread (which got wiped by Embarcadero) reminded be about the differences between these two character values.

Quoting from the first post:

c1 := #128;
c2 := chr(128);
Assert(c1 = c2);

the assertion fails, meaning that c1 <> c2.

In fact c1 = #$20AC and c2 = #$80.

Read the rest of this entry »

Posted in Delphi, Development, Encoding, Software Development, Unicode | 2 Comments »

Delphi – TCustomGrid.InvalidateCol and InvalidateRow bug that has been there since at least Delphi 4^H^H^H^H^H^H^H^H 2 and 1

Posted by jpluimers on 2010/01/12

I just re-reported this in in QC as 81060, but wanted to let you know that there is a bug in TCustomGrid.InvalidateCol and TCustomGrid.InvalidateRow which has been there since at least Delphi 4 Delphi 1 (InvalidateRow) and Delphi 2 (InvalidateCol) and still present in Delphi 2010.

Both methods will not invalidate the entire Row/Col but only the Left/Top most cells of that Row/Col.
So the invalidate the absolute rectangle in stead of the visible rectangle.

You will see this behaviour when you have a virtual grid that is larger than the actual grid on the screen, you scroll through that grid, and perform your own drawing.

Boths bugs are easy to fix, have been reported in QC as number 8472 before (and reported even before QC existed), but denied as ‘test case error’  in stead of being investigated further.
The earliest reference I could find on them is as number 531 in the Delphi Buglist, by Rune Moberg, long time and well respected Delphi developer and bikedude.

Some of the 3rd party grid vendors are also to blame: they seemed to have worked around it without pressing the Delphi team to solve the issue.
For instance, the infamous rxgrid, just invalidates all Rows within InvalidateCol. Now that is pure overkill, as my solution will show. Read the rest of this entry »

Posted in Delphi, Development, QC, Software Development | 2 Comments »