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

BLTN: GExperts build 1.35 for Delphi and RAD Studio XE2

Posted by jpluimers on 2011/09/28

I forgot to blog on this while prepping for Delphi Tage and DelphiLive, so here it goes (BLTN, no, not that movie):

Thursday, 01 September 2011 00:00
We now have a pre-release of GExperts 1.35 available for download that supports RAD Studio XE2.  We especially appreciate your help testing FireMonkey and 64-bit compatibility, support for unit scope prefixes, etc.

–jeroen

Via: Delphi and RAD Studio XE2 Support | General.

Posted in Delphi, Development, Software Development | 1 Comment »

Delphi Spring, Mocks and how to use them: some links

Posted by jpluimers on 2011/09/27

Now that there is Spring and Mocks for Delphi, it is time to post a few links:

Hope you enjoy them as much as I do!

–jeroen

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

A few more classics on BitSavers in the /pdf/borland tree

Posted by jpluimers on 2011/09/27

Hope you like these classics from the early Borland era:

Oh, and if you – like me – started in the Apple ][ and Lisa era, there are lots of nice documents of Apple products from that period to, for instance:

–jeroen

Via: Index of /pdf/borland.

Posted in BitSavers.org, Delphi, Development, History, Software Development | 5 Comments »

C# Using Blocks can Swallow Exceptions | DigitallyCreated

Posted by jpluimers on 2011/09/22

I got to the SafeUsingBlock extension method because of a nice StackOverflow thread on exceptions swallowed in a using block.

Actually, you can broaden the case into a wider scope: in any language when you protect resources in a try finally block (essentially, a using will turn into an implicit try finally block), and both the core logic and the finally throw an exception, the exception from the core block is swallowed.

Simple C# example:

using System;
public class Example
{
    public void Main()
    {
        try
        {
                try
                {
                    throw new ApplicationException("logic block");
                }
                finally
                {
                    throw new ApplicationException("finally block");
                }
        }
        catch (Exception error)
        {
            Console.WriteLine(error.ToString());
        }
    }
}

Simple Delphi example:

program Example;
begin
  try
    try
      raise Exception.Create('logic block');
    finally
      raise Exception.Create('finally block');
    end;
  except
    on error: Exception do
    begin
      Write(error.ClassName, ' ', error.Message);
    end;
  end;
end.

Both examples will only write out the finally block exception message, not the logic block exception message.

This is a corner case (like the example from the MSDN documentation), from which the SafeUsingBlock protects you from by providing an AggregateException class.

In C#, it is a guideline to avoid throwing exceptions in the Dispose when implementing the disposable pattern.

This is good practice in any programming environment: when disposing objects, only throw exceptions in very critical situations when the containing process has been corrupted.

Practically this is very easy as the disposers are very thin and should not contain any business logic, so it is pretty easy to spot places where the program state really is corrupt.

An other alternative is for instance have a Close method that throws an exception, and a disposer not throwing.

–jeroen

via C# Using Blocks can Swallow Exceptions | DigitallyCreated.

Posted in .NET, C#, Delphi, Development, Software Development | 7 Comments »

Dropbox – Simplify your life – easy way to sync your iOS Delphi XE2 FireMonkey stuff between your Mac and PC

Posted by jpluimers on 2011/09/20

One of the things hard when doing FireMonkey iOS development Delphi XE2 is that you have a multi stage process:

  1. Develop and test using Delphi XE2 on Windows
  2. Compile and deploy on the iOS Simulator using xCode on OS X
  3. Deploy on the real iOS hardware using xCode OS X

Basically you need to share your project files both ways between Windows and OS X.

Naturally, you would share files between your Mac and Windows using Samba. With the introduction of OS X Lion, the Samba support was rewritten, causing all sorts of problems.

One of the problems is that it uses a lot of CPU (I tried copying over a 40GB VM, and stopped because the fan in my MacBook Air was making so much noise, I was afraid it was going to take off).
I didn’t even realize it had one, but a MacBook Air has a Fan, and it vents through the keyboard :)

Now I use DropBox to share files between it. If you like that to, sign up with the URL at the end of this line. The 2GB account is free! http://db.tt/6f95UJW

And if you know a better way of sharing: please let me know!

–jeroen

Via: Dropbox – Referrals – Simplify your life.

Posted in Apple, Delphi, Development, FireMonkey, Mac OS X 10.7 Lion, Power User, Software Development | 15 Comments »

Windows Metro Style Apps Developer Downloads: very early version of Windows 8

Posted by jpluimers on 2011/09/14

The download page states

The Windows Developer Preview is a pre-beta version of Windows 8 for developers.

But of course this is also interesting to designers and regular users: getting a hands-on impression of what Metro will bring to Windows 8.

–jeroen

via: Windows Metro Style Apps Developer Downloads.

Posted in .NET, Delphi, Development, Power User, Software Development, Windows, Windows 8 | 2 Comments »

Delphi XE2 x64 Extended floating point support: CodeCentral 28488 TExtendedX87: FPU-backed 80-bit Extended type for Win64

Posted by jpluimers on 2011/09/14

in the Delphi 64 world, there is no official support for the Extended data type for various reasons.

If you really need it, then you can use the TExtendedX87 unit by Philipp M. Schlüter as mentioned in this Embarcadero forum thread.

–jeroen

Via: 28488 TExtendedX87: FPU-backed 80-bit Extended type for Win64.

Posted in Algorithms, Delphi, Delphi x64, Development, Floating point handling, Software Development | 2 Comments »

Two more FastMM XE2 updates on SourceForge.net in the SVN SCM trunk:

Posted by jpluimers on 2011/09/13

Earlier this week, I wrote about FastMM XE2 update on SourceForge.net in the SVN SCM trunk.

Pierre le Riche has been busy, and got the x64 FullDebugMode working with these two changes to the SourceForge.net: FastMM: SCM:

Needs to be tested, so will do that the upcoming days.

–jeroen

Posted in Delphi, Delphi x64, Development, Software Development | 1 Comment »

Triest bericht: de SDC gaat dit jaar niet door. De altijd kleurrijke conferentie van de SDN voor Nederlandse software ontwikkelaars heeft het dit jaar niet gehaald

Posted by jpluimers on 2011/09/12

Quote van de SDC site:

Helaas heeft de SDN moeten besluiten om SDC voor dit jaar (2011) van de agenda te halen.

In 2012 zullen wij opnieuw een SDC organiseren.

De aankomende SDE van 9 december is reeds in ver gevorderd stadium

Wij hopen u daar te mogen begroeten

Echt heel jammer, want de SDC bracht al heel lang kleur in het landschap van de Nederlandse software ontwikkelaar, juist vanwege de keur aan sprekers (ze haalden altijd de meeste interessante sprekers uit buiten- en binnenland).

SDC (en haar voorloper CttM) was erbij toen Clipper begon, Delphi begon en .NET begon. Warme herinneringen komen boven aan al die prachtige conferenties, en mensen die ik er heb leren kennen.

Laten dus hopen dat het volgend jaar gewoon weer door gaat.

–jeroen

via SDN – Software Development Network > SDN > SDN Event > SDN Conferences 2011.

Posted in .NET, Delphi, Development, Software Development | Leave a Comment »

FastMM XE2 update on SourceForge.net in the SVN SCM trunk

Posted by jpluimers on 2011/09/11

Pierre le Riche just committed two changes to the SourceForge.net: FastMM: SCM:

Which means that I can demo this during my DelphiLive sessions.

Great work Pierre!

–jeroen

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