Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Even when not using Visual Live Binding, Delphi generates empty .VLB files in both Delphi XE3 (virtually always) and Delphi XE4 (most of the time).

Visual Live Binding is one way of binding data to UI in FireMonkey and can also be used in VCL, but does not have to (Alister Christie made a nice video ▶ Delphi Training Tutorial #77 – Visual Live Bindings – YouTube about it).

Empty VLB files, and a batch file to delete them

The “empty” VLB files are almost empty, as they are exactly 3 bytes long and contain the byte sequence EF BB BF which is the Unicode BOM (byte order mark) for the UTF-8 encoding.

So technically they are not empty, but practically they are as there is no content.

The “empty” VLB files clutter your disk and version control information, so I have written a small batch file that – together with an empty VLB file– can clean up a directory tree of those empty VLB files.

You can get those files from the Delphi Scripts directory in my BeSharp.net open source repository.

Usage is a snap: just specify the target root directory.

C:\Users\developer\Versioned\BeSharpNet\Native\Delphi>Scripts\delete-empty-VLB-files.bat .
emptyVLB=C:\Users\developer\Versioned\BeSharpNet\Native\Delphi\Scripts\Empty.vlb
delete "C:\Users\developer\Versioned\BeSharpNet\Native\Delphi\Apps\TicTacToe\TicTacToeFireMonkeyMobile\TicTacToe_FireMonkeyMobileFormUnit.vlb"

–jeroen

PS: So far it looks like Delphi XE5 doesn’t generate empty VLB files any more (:

Speaking of which: Embarcadero recently Delphi XE5 Update 2 with C++Builder for iOS and lots of bugfixes.

They also run an end-of-year special: http://www.embarcadero.com/radoffer

I will detail more on that later, but one of the nice parts is that it includes a free PDF copy of the current CodingInDelphi book by Nick Hodges.

It is the finest recent Delphi book and complements all the Delphi books released so far. So be sure to get the book now by upgrading to Delphi XE5, otherwise you have to wait for the LeanPub version of CodingInDelphi.


Filed under: Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development Tagged: Delphi, VLB

Viewing all articles
Browse latest Browse all 1725

Trending Articles