Planet Object Pascal

December 20, 2014

The Wiert Corner - irregular stream of stuff


Earlie this month, I wrote a review about Delphi Cookbook.

Well: as of last thursday, you can get that for USD 5 (or EUR 4.80, so better get yourself a USA account: just ensure your address is in the USA).

Heck: until januari 6th, you can get any eBook or Video on Packt for USD 5.

Note there is even an x-Mas countdown on the way (with each day a free book that is readable/downloadable for 24 hours).

There’s over 2500+ books to choose from, so I’m grabbing this chance to learn a few things on OpenCV, Scala, and PowerShell.


via: Book review: Delphi Cookbook by Daniele Teti, Packt publishing.

Filed under: .NET, CommandLine, Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Java Platform, PowerShell, Scala, Scripting, Software Development Tagged: Delphi Cookbook, Packt

by jpluimers at December 20, 2014 09:08 PM

Pascal Warrior's journey

Data access benchmark: direct query, dOPF object query, dOPF entity query

It's been a long time since my last post (over a year!). In this post I'd like to share some benchmark result of data access using Free Pascal. The setup is as below:

  • Machine: HP Pavilion 14-n038tx
    • OS: Manjaro Linux x86-64 0.8.11 + first update + flash plugin critical security update, kernel 3.17.4-1-MANJARO
    • CPU: Intel Core i5-4200u 1.6 GHz (Turbo Boost up to 2.6 GHz)
    • RAM: 4 GB (stock) + 4 GiB (additional) = 7.6 GiB
    • HDD: Hitachi HTS54757 Rev A50A 750 GB ~= 698 GiB
  • Development Environment:
  • Benchmark Environment
    • MariaDB 10.0.15, default settings
    • Table 1: 2600 rows
    • Table 2: 2654 rows
    • Select query that joins table 1 and table 2 on an integer key
Actual table information is hidden, because they're real table used in my company's product, which is of course a proprietary product. A little info: table 2 has a foreign key to table 1, because it's meant as multilingual information for table 1 rows.

Benchmark flow is simple:
  1. Connect to db
  2. Query
  3. Loop over the result while creating JSON array of object
  4. Write it out (for output correctness comparison)
The result is, well, interesting as well as confusing. Why? Here's the result when I limit my select query result (in the SQL statement) to 2651 rows:

Looks normal, isn't it? A framework will have overhead so direct query will always be faster. But wait, what if I change the limit to 2652 or even without one:

Dafuq? How come dOPF ones get faster? At this stage, I thought the resulting txt files of dOPF might be broken, so I diff them with direct query one. Nope, they're all the same. I have no explanation at the moment because I haven't got the time to dig in what dOPF (or probably SQLdb as its connector) do to make this weird result.

dOPF surely has a big advantage over direct query because it's easy to change backend dbms simply by changing the value of TdSQLdbConnector.Driver. If the result is also faster than direct query, then there's no any other reason to use direct query for portable, cross dbms programming solution.

dOPF as a framework is very modular, it supports:
  • manual SQL
  • entities (result row is automatically converted as Pascal object, with automatic memory management)
  • SQL builder (automatic SQL generation from given conditions)
  • OPF itself (no SQL required in your code, you can save, load and access objects just like any other Pascal objects)
You're not forced to use one, feel free to mix any of them as you like.

If you want to try yourself, the whole package (source files + benchmark script) is available here. You should be able to run this on any supported platforms, provided you have bash (>3.0) & bc installed (because the benchmark script depends on it). Don't forget to edit to fill it with your database name and query.

Feel free to add more persistence frameworks (tiOPF for instance) or libraries (ZEOS for instance) to make more data available.

by (leledumbo) at December 20, 2014 05:41 PM

Firebird News

firebird2.5: CVE-2014-9323: Segfault in server caused by malformed network packet

A CVE-ID is assigned to this vulnerability CVE-2014-9323 The following distros already patched the bug : Suse , Debian , Fedora , RedHat , CentOS  

by mariuz at December 20, 2014 01:40 PM

December 18, 2014

The Wiert Corner - irregular stream of stuff


Interesting comment by Marco Cantu:

R&D at Embarcadero is working on a 64bit iOS compiler, oh well actually 2 of them, also C++. We’ll support 64bit and “universal binaries” (bundling both 32 and 64 bit binaries) requested by Apple.The Feb 1st requirement is only for new apps, not for updating existing ones, but still we are trying to make a solution available by that time.The roadmap describes the entire year, more than the individual release. This time around we are trying to have it public by January, covering what we expect to deliver in 2015.


via: Just got another reminder from Apple about 64 bit IOS requirements from Feb….

Filed under: Delphi, Development, iOS, Mobile Development, Software Development

by jpluimers at December 18, 2014 07:30 PM

Firebird News

Time to remember the Firebird band Xmas special!

For those who didn’t follow FirebirdNews in the past years, check out the Firebird Band performing a classic Christmas song I hope the guys will enjoy it! Personalize funny videos and birthday eCards at JibJab! Band is: Drums: Alex “Bonham” Peshkov Guitar: Vlad “Vai” Khorsun Guitar: Claudio “Friedman” Valderrama Bass: Adriano “Harris” Fernandes Vocal: Dmitry “Plant” Yemanov

by Cantu at December 18, 2014 06:57 PM

Te Waka o Pascal

On The Shoulders of Giants…

When discussing mobile device application development using Oxygene or other RemObjects Elements technologies, the question of user interface designers doesn’t usually take long to come up (particularly with Delphi developers). Up to now the answer has always been Xcode Interface Builder for iOS/OS X, Visual Studio WinForms/WPF Designers for .Net and… um… your favourite text […]

by Jolyon Direnko-Smith at December 18, 2014 07:57 AM

December 17, 2014

Firebird News

Firebird Advent Calendar 2014

Very nice idea Firebird Advent Calendar 2014 (Japanese)

by mariuz at December 17, 2014 12:05 PM

Vote for Firebird as Database of the Year 2014 at LinuxQuestions

Vote for Firebird as Database of the Year 2014 at LinuxQuestions (must be registered user with at least one Linux related post) Spread the word on all forums and Firebird communities

by mariuz at December 17, 2014 11:59 AM

Advanced Data Generator 3.3.0 released

Upscene Productions announces the release of: “Advanced Data Generator 3.3.0″ A fast test-data generator tool that comes with a library of real-life data, can generate data to your database, SQL script or CSV files, many filling options, presets and much more. If you develop database applications, you need data for testing purposes! Version 3 included […]

by Martijn Tonies at December 17, 2014 11:02 AM

The Wiert Corner - irregular stream of stuff


A small follow up on MVVM, MVP, MVC, OOD, etc: it is all about structure and using common sense:

When you want to do MVVM with Delphi, there is a great Delphi MVVM demo that Malcolm Groves gave at CodeRage 7 that is on YouTube.

A few resources you should look at after viewing that demo:

Some of it might work with Delphi XE2, but I think you need XE3 or younger for most of the demos.


Filed under: Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at December 17, 2014 05:00 AM

December 15, 2014

The Wiert Corner - irregular stream of stuff

Firebird News

Database Workbench 5.0.6 released

Upscene Productions is proud to announce the availability of the next release of the popular multi-DBMS development tool: ” Database Workbench 5.0.6 “ This release fixes a few MySQL related bugs and introduces new functionality for Firebird 3. “There is so much new in Database Workbench 5, I don’t know where to start”, says Martijn […]

by Martijn Tonies at December 15, 2014 11:47 AM

December 14, 2014

Castle Game Engine news

We present a demo of Castle Game Engine and Spine integration :) Fly the dragon around an eerie scene...

We present a demo of Castle Game Engine and Spine integration :) Fly the dragon around an eerie scene, with animated stuff all around.

* For Android on ,
* for Windows or Linux on .
* The source code and data in engine SVN repository, see for links to SVN, this demo is inside castle_game_engine/examples/2d_spine_game/ directory.

Have fun! See also the movie on

December 14, 2014 05:16 PM

Recent engine improvements: - Android: Installing and moving applications from/to SD card fixed. -...

Recent engine improvements:

- Android: Installing and moving applications from/to SD card fixed.

- Build tool: Various fixes, also for Android packaging. All Castle Game Engine Android games and examples now use castle-engine build tool for Android packaging.

- Android: Added screen_orientation="any" or "landscape" or
"portrait" to CastleEngineManifest.xml. See

- X3D: documentation of new X3D extensions (used by our Spine loader, but may also be useful for other purposes too):

1. NavigationInfo.blendingSort

2. CubicBezierXxx interpolators

3. TextureProperties.guiTexture

4. X3DSequencerNode.forceContinousValue_Changed

December 14, 2014 05:14 PM

December 11, 2014

Firebird News

FireBird Performance Tweaking

Mr. Hartmann wrote on his blog Last week, I posted a story about my interaction with a software developer who uses FireBird (FB) as a back-end for their software. The short version is that they left FB’s settings at default and were using a really, REALLY old version of FB. This caused the application to […]

by mariuz at December 11, 2014 02:06 PM

Software performance investigation vs throwing more hardware

News via Patrick Pierson‘s blog I found this link on reddit under /r/sysadmin. Josh Hartmann has a customer that had slowness issues with a database server. Josh contacted the developer and every time the developer’s response was to add more hardware to the problem. After some investigation he found a few issues with the developer’s setup of […]

by mariuz at December 11, 2014 01:33 PM

December 10, 2014

Firebird News

Testing the Firebird 3 protocol enhancements

In the 9th Firebird Developers Day, we collected donations to sponsor the enhancements of the Firebird wire protocol, to optimize the speed of communication in high latency networks (aka. internet). Dmitry Yemanov implemented the optimizations that were finally available for public testing with the release of the Firebird 3 Beta 1, a few days ago. […]

by Cantu at December 10, 2014 07:59 PM

Firebird Security Updates for v2.1 and v2.5 series

The Firebird project has released Security Updates for the currently maintained 2.1.x and 2.5.x versions (v2.1.7 and v2.5.3 SU1). These updates fix a recently discovered security vulnerability (CORE-4630) that may be used for a remote DoS attack that could be performed by unauthorised users. We recommend Firebird users to upgrade as soon as is practical.

by mariuz at December 10, 2014 11:35 AM

The Wiert Corner - irregular stream of stuff

December 09, 2014

The Wiert Corner - irregular stream of stuff


In Delphi 6 and 7, .ddp files were used to store the Delphi Diagram Portfolios.
Often these files were created empty like `Empty.ddp`, so it pays to clean up those.

The below batch file (part of the free code repository) will help with that. Make sure you download this Empty.ddp file and put it in the same directory as the batch file.

Call the batch file with the path to the directory tree you want to delete the Empty .ddp files from.


Filed under: Delphi, Delphi 6, Delphi 7, Development, Software Development

by jpluimers at December 09, 2014 05:00 AM

December 08, 2014

Firebird News

Firebird 3.0 package progress in #Debian

Here you can check Firebird 3.0 Debian package progress Damyan added quite a few changes compared with version from 3 years ago

by mariuz at December 08, 2014 01:32 PM

December 06, 2014

הבייט הלבן

SMD: מוניטור סריאלי משופר

כמעט כל מי שעובד עם ארדואינו עובד גם עם ה"סריאל מוניטור" המובנה של סביבת הפיתוח, ועובד איתו הרבה. המוניטור הזה מאד בסיסי, מה שהופך אותו לקל מאד לשימוש – אבל גם מגביל את המשתמשים בהרבה אופנים. נכון שהגיע הזמן למצוא תחליף נורמלי? תוכנות "מקצועיות" לתקשורת סריאלית, כמו PuTTY או RealTerm, מציעות הרבה יותר אפשרויות אך […]

by עידו גנדל at December 06, 2014 09:25 PM

Castle Game Engine news

Getting closer to next engine release:) Latest news: 1. High-quality image scaling: TCastleImage.MakeResized...

Getting closer to next engine release:) Latest news:

1. High-quality image scaling: TCastleImage.MakeResized method offers new high-quality image interpolation modes, like Mitchell, Blackman, Lanczos, Gaussian and more. See and . The implementation uses excellent fcl-image underneath:)

2. The icons for Android apk are now generated using Lanczos scaling, providing much better quality than simple bilinear used previously.

3. Small build tool for Android (see fixes.

December 06, 2014 07:07 PM

December 04, 2014

Firebird News

Rails activerecord-fb-adapter v0.9 includes a major tests overhaul

News via Brent Rowland: Rails activerecord-fb-adapter v0.9 includes a major overhaul courtesy of Ray Zane. 20x more tests now pass. Update : now is pushed to rubygems

by mariuz at December 04, 2014 05:05 AM

The Wiert Corner - irregular stream of stuff


I’ve done partitioned programming (using various layers for different kinds of functionality) for ages.

The first time I can remember of official terms for it, I already used patterns like that for a couple of years.

Back then the parts were from Object-Oriented Design: Peter Coad, Edward Yourdon, back in a time when each part – back then not called common layer – was called “component”:

  • PDC – Promblem Domain Component
  • HIC – Human Interaction Component
  • TMC – Task Management Component
  • DMC – Data Management Component

Back in the 90s, lots of people knew those by heart, nowadays, few people do. That’s how history goes (:

For the people with a long history of Pascal or Delphi among us: Peter Coad even worked at Borland for a short period right before moving his work out of the software development field.

I never was deeply into SmallTalk, otherwise back then I would have known an abbreviation that started much easier and lasted much longer MVC (Model–View–Controller).

The two big things I learned while developing software (for over 25 years now), is that you need to structure your stuff, they way those structures or common layers are called will change over time.

Over the course of time lots of those abbreviations have come, some of gone, others lasted. But the need for structure continued.

The funny thing is that in my world, quite a few work comes in through recruiters. I sift the good and bad ones on how they select me for jobs: are they abbreviation frenzy or do they actually read my curriculum vitae in depth?

For the former, here is a list of software architecture patterns I have used or am still using (:

Note though it is not about those abbreviations, but on the awareness that you should structure your code, use common sense and have a common vocabulary within your group of developers.

It reminds me of project methodologies. I know Scrum, but never liked playing rugby. Given that most methodologies are based on best practices within an organisation, I always tell people I’m a fan of JBF2. It is a Dutch inside Prince2 joke as variation on JBF. So it actually is not a methodology at all, but the urge to following your intuition and use common sense. Which you should always do, even if you follow a formal methodology.


PS: some great Delphi MVVM info.

Filed under: Delphi, Development, Pascal, Software Development, Turbo Pascal

by jpluimers at December 04, 2014 05:00 AM

December 02, 2014

Castle Game Engine news

Easy development of Android 3D and 2D games for everyone using our Castle Game Engine :) Latest improvements...

Easy development of Android 3D and 2D games for everyone using our Castle Game Engine :) Latest improvements of our for Android:

* "install" target, to easily install and run your game on a connected Android device.
* good apk for Android out of the box (with good project name, good qualified name, full debug options (in debug build) and more).
* reading AndroidAntProperties.txt for key store information, to sign release apk.

December 02, 2014 01:53 AM

December 01, 2014

Firebird News

Firebird 3 Beta 1 released

Firebird Project announces the first Beta release of Firebird 3.0, the next major version of the Firebird relational database, which is now available for testing. This Beta release demonstrates the features and improvements currently under development by the Firebird development team. Our users are appreciated giving it a try and providing feedback here. Apparent bugs […]

by Cantu at December 01, 2014 01:16 PM

The Wiert Corner - irregular stream of stuff


Via Best C# Article of October 2014 Nicolas Dorier – NBitcoin I learned that dthorpe (yes, that is indeed Danny Thorpe many people know him from the Delphi, C# and Google world) is active as Contributors to NicolasDorier/NBitcoin and on quite some Bitcoin related repositories.

When we met last summer, he was visiting the Bitcoin 2014 conference in Amsterdam. It is really good to see his activity, and I really hope his venture (see his LinkedIn profile) will take off, as his ideas are sound.


Filed under: .NET, Bitcoin, C#, Cryptocurrency, Delphi, Development, History, Power User, Software Development, Windows Azure

by jpluimers at December 01, 2014 11:00 AM


After speaking on EKON 2014 and ItDevCon 2014, the last month has been extremely busy on both the work and family side of things.

So it took longer to write my review of the Delphi Cookbook by Daniele Teti, Packt publishing (ISBN 978-1783559586).

Before the review, first two ways to see for yourself if you’d like the book:

Daniele Teti has a Table of Contents on the page where he introduced his book, but that ToC is a bit poorly formatted, so I included a better formatted one below.

Some other reviews of the Delphi Cookbook also make an interesting read (I read them after writing my own):

Before the review a disclaimer. I bought the eBook version before Packt publishing asked for reviewers. They sent me a paper copy for free (which somehow took 2 weeks to arrive). I read about 25% of the book before the two European Delphi conferences, and the rest over the last two weeks.

The Review

I’ll try to keep this to the point, as too much detail would be killing. And I’m not writing a book here (:

So lets start with what I like:

  • Writing style: most of it is very pleasantly and encouraging to read.
  • Structure
    • introduction – short description of the aim
    • how to do it – step by step explanation to get an example working
    • how it works – explaining the crucial parts of the example
    • there’s more – revealing more details and providing background information
  • Explanation where recipe deviates from best practices
  • Mix of topics
  • Fresh and surprising examples
  • Building the examples on (relatively) new language and library features without distracting the examples: I was positively surprised about every other example how well Daniele did this
  • For Delphi features in the book introduced in a specific Delphi version mentioning this version
  • Keeping a variety of topics throughout the book, while still building up on previous sections during the book

I want to stress the last: Daniele Teti did an excellent job on this.

When writing a book or teaching material, it is hard to strike balances between the kinds and diversity of topics, the depth and order of the topics, and choosing between what to cover and how to cover it.

The way the chapters a built together with a variety of interesting topics per chapter, a great mix of chapters, and the various topics building (but not too much relying) on previously covered topics is really great. The whole book shows that Daniele is a great teacher. Well done.

Then a few things I dislike:

  • Chapter 1
    • The first chapter has a few VCL topics that could have been explained better. I have the feeling those were the initial writing chapters, and Daniele and the reviewers were still settling down on a routine. Shortly after that, the book gets much much better: like hearing Daniele doing a talk on a conference.
  • Code formatting
    • Especially in the eBook, the code is poorly formatted. There are enough tools to to a properly formatted example code export from Delphi, so this should have been done much better.
  •  Proofreading
    • There is still a quite a bit of non-English idiom and sentence structure in the book. This can be distracting. The reviewers and editors should have done a better job on this.
  • Security
    • Even though explaining SQL injection, the book does not talk about any other kinds of injection. Since there are many examples of clients and servers passing parameters by strings, there is virtually no error checking. This is bad, as exactly those kinds of parameter passing can make for very vulnerable applications.
  • Hard coded Delphi XE6 links
    • most of the Embarcadero web site allows you to link to topics in a non-Delphi version speficif way
  • Some “there’s more” portions are a bit thin
    • I know this is a trade off: so few pages, to much to cover. But still (: Maybe Daniele finds time to write a series of blog posts on the “there’s more” portion.
  • Cleanup without doing try..finally
    • Way too few programmers value the try..finally construct (Delphi, C#, and many other languages) so this should be the cornerstone of every resource cleanup example.

The dislikes are minor compared to the likes, so here is the…


I didn’t buy the book by accident: knowing the presentation and teaching style of Daniele, I was expecting a nice mix of topics explained in a light and fun way. The book surpassed those expectations by far.

So any Delphi programmer should buy this book. If not for using right now, then for getting some ideas, and reading the various topics later.

Below some suggested combinations for using this book various Delphi audiences.



Buy this book. It gets you inspired, even if only some of the topics are suited for real beginners. Then get the books below, read them and get back to the Delphi Cookbook for more inspiration:

Average Delphi users

Buy this book. Consider buying Coding in Delphi by Nick Hodges.

Advanced Delphi users

Also read Coding in Delphi by Nick Hodges.

Delphi gurus

I know few people that master all Delphi topics well (I’m not one of them: especially on the mobile side I’ve still a lot to learn). Even for gurus, I think this is a nice book, especially considering the price.


Table of Contents

Chapter 1: Delphi Basics

  1. Changing your application’s look and feel with VCL styles and no code
  2. Changing the style of your VCL application at runtime
  3. Customizing TDBGrid
  4. Using the owner’s draw combos and listboxes
  5. Creating a stack of embedded forms
  6. Manipulating JSON
  7. Manipulating and transforming XML documents
  8. I/O in the twenty-first century – knowing streams
  9. Putting your VCL application in the tray
  10. Creating a Windows service
  11. Associating a file extension with your application on Windows

Chapter 2: Become a Delphi Language Ninja

  1. Fun with anonymous methods – using higher-order functions
  2. Writing enumerable types
  3. RTTI to the rescue – configuring your class at runtime
  4. Duck typing using RTTI
  5. Creating helpers for your classes
  6. Checking strings with regular expressions

Chapter 3: Going Cross Platform with FireMonkey

  1. Giving a new appearance to the standard FireMonkey controls using styles
  2. Creating a styled TListBox
  3. Impressing your clients with animations
  4. Using master/details with LiveBindings
  5. Showing complex vector shapes using paths
  6. Using FireMonkey in a VCL application

Chapter 4: The Thousand Faces of Multithreading

Synchronizing shared resources with TMonitor
Talking with the main thread using a thread-safe queue
Synchronizing multiple threads using TEvent
Displaying a measure on a 2D graph like an oscilloscope

Chapter 5: Putting Delphi on the Server

  1. Web client JavaScript application with WebBroker on the server
  2. Converting a console service application to a Windows service
  3. Serializing a dataset to JSON and back
  4. Serializing objects to JSON and back using RTTI
  5. Sending a POST HTTP request encoding parameters
  6. Implementing a RESTful interface using WebBroker
  7. Controlling remote applications using UDP
  8. Using App Tethering to create a companion app
  9. Creating DataSnap Apache modules

Chapter 6: Riding the Mobile Revolution with FireMonkey

  1. Taking a photo, applying effects, and sharing it
  2. Using listview to show and search local data
  3. Do not block the main thread!
  4. Using SQLite databases to handle a to-do list
  5. Using a styled TListView to handle a long list of data
  6. Taking a photo and location and sending it to a server continuously
  7. Talking to the backend
  8. Making a phone call from your app!
  9. Tracking the application’s life cycle

Chapter 7: Using Specific Platform Features

  1. Using Android SDK Java classes
  2. Using iOS Objective-C SDK classes
  3. Displaying PDF files in your app
  4. Sending Android intents
  5. Letting your phone talk – using the Android TextToSpeech engine


Filed under: Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at December 01, 2014 11:00 AM


Every vendor should publish version numbers like this to make it easier for their customers to check if they are current or not.

I can’t promise to have a complete list, or the latest versions, but I will update with the versions I have used.


Filed under: Delphi, Delphi XE, Delphi XE2, Development, Software Development

by jpluimers at December 01, 2014 05:00 AM

November 30, 2014

Castle Game Engine news

Our build tool ( ) can now package your game...

Our build tool ( ) can now package your game for Android. This means that once your game compiled for Android ( ), it is trivially easy to have an xxx.apk file (that you can distribute through WWW or upload on Google Play). All it takes is filling some basic info in CastleEngineManifest.xml (see wiki page for docs) and calling "castle-engine package --os=android --cpu=arm".

Some small improvements to the build tool on Android are planned next week, but basically it's already usable, apk is generated nicely!

November 30, 2014 05:01 PM

November 28, 2014

while true do;

Sending Android Intents from Delphi (Part 2)

Some months ago I wrote a post with title “Sending Android Intents from Delphi (Part 1)”. In that post I promised to write a 2nd part… here’s it is! This time I want to play a video deployed with my APK using an external player. Some informations are available on the Internet, but to correctly know how [...]

by Daniele Teti at November 28, 2014 10:46 PM

March 2014 news about “DelphiMVCFramework”

In the last months DMVCFramework has been used in many projects. Some fixes and some new features has been added. Tomorrow will start the 4th training from the Jan 1st 2014 on DMVCFramework… WOW! The best selling training is “Developing Web Client applications using AngularJS and DelphiMVCFramework” (a slightly modified version of this classic training Tomorrow the training [...]

by Daniele Teti at November 28, 2014 10:45 PM

PACKT Publishing Book Review: “Gideros Mobile Game Development”

As you probably know, I did some reviews on PACKT Publishing technical books. Now I did a review on a new book about Gideros Mobile. At bit Time Software we used to create mobile games too and in the last months some of them have been built with Gideros Mobile (we do also training on [...]

by Daniele Teti at November 28, 2014 10:45 PM

ITDevCon 2014, Call4Papers

Dear potential ITDevCon speaker, As every year, I’m building the agenda for next ITDevCon that will be held next october 23th, 24th in Milan (Italy), in a new location. This will be the 6th edition ( we’re getting conference experts J ) The call for papers are officially open right now, so if you want to propose some [...]

by Daniele Teti at November 28, 2014 10:44 PM

Firebird News

Firebird on Power8 Ubuntu/Debian Linux

Firebird can be installed on both Little Endian (ppc64el) and Big Endian(ppc64) versions of Power8 Linux Operating Systems There was a recent bug in detection of ppc64el (was mis-detected as powerpc64) but now is fixed in Debian Also if you use other distros on power8 please verify if Firebird platform is detected correctly.

by mariuz at November 28, 2014 01:10 PM

IBSurgeon Black Friday Sales

Only today you have ability to buy any IBSurgeon product for 50% of its regular price. For example, IBSurgeon Enterprise Pack will cost EUR274.5 instead of EUR 549. Upgrade to FirstAID for 50 databases – EUR 99.5 instead of EUR 199. How to buy? Visit our online Purchase page (, select product, and enter the […]

by IBSurgeon News at November 28, 2014 01:02 PM

November 27, 2014

Andy's Blog and Tools

Tools used to develop IDE Fix Pack

I use and have used the following tools when I work on my IDE Fix Pack plugin.

  • BDS 2006/2007, RAD Studio 2009-XE7 + Debugger
  • WinDbg
  • .NET CLR Debugger, ildasm, Reflector/ILSpy for ErrorInsight patches in 2006-2010
  • HxD (hex editor) to find byte sequence or parts of it from one Delphi version in the other Delphi versions
  • Gigabyte’s EasyTune to limit my CPU speed to 800 MHz to catch performance bottlenecks.
  • ProcessMonitor to find I/O and Registry performance bottlenecks
  • DelphiF12HotKeySupport for performance bottlenecks (not working under Win 8.x but I have my Win 7 VM)
  • DebuggerCallStackResolver (private tool) to use jdbg files and dbghelp.dll for better call stacks and a more descriptive CPU-View
  • “CPU-View to FindMethod” (private tool) to convert the CPU-View listing to an “array of SmallInt” (using “-1” as a wildcard) that is used by my FindMethod function to find the byte sequences in memory.

Where is IDA Pro? – I don’t use it.

by Andreas Hausladen at November 27, 2014 08:49 PM

Firebird News

Over 15M downloads in total for Firebird project on sourceforge

Here are some stats and badges via SourceForge Downloads per Month: SourceForge Downloads per Week: SourceForge Downloads per Day: SourceForge Downloads Total: You can find the download stats on the sourceforge file stats area

by mariuz at November 27, 2014 08:11 PM

The Wiert Corner - irregular stream of stuff

November 26, 2014

Firebird News

Firebird ODBC driver 2.0.3 released

Firebird ODBC driver 2.0.3 is released today Updated information on on the ODBC driver page

by mariuz at November 26, 2014 04:21 PM

twm’s blog

Fighting Secure Boot

I have bought an Acer Extensa notebook after reading the under 300 Euros notebooks test in the latest c’t magazine where it came up as the winner regarding battery life and the rest wasn’t too bad either. I chose the 4 GB model so it won’t thrash the hd all the time. The Extensa comes preinstalled with Windows 8.1 and – as so many computers nowadays comes without an install medium and also without a user’s manual. (The link given in the short setup guide for downloading the manual leads to a non-functional site. Not very user friendly in my book.)

Now, what is the first thing you do, when you get a new computer which comes pre-installed with an operating system but does not come with an install medium? I for one, make a backup, preferably an image backup of the whole hard disk using Clonezilla. Since this is my image backup tool of choice I carry it with me on a USB stick almost all the time (Hey, I work in IT, so it’s pretty much normal to carry USB sticks and other stuff. ;-) ). So I plugged that USB stick into the notbook and booted it up. It went straight into the Windows 8.1 setup screen. :-(

So I tried to get a boot menu. Perusing Google told me that Acer notebooks use F12 for the boot menu. Unfortunately this didn’t work. Windows 8.1 setup again. :-(

Next, I tried to get into the BIOS, or whatever the UEFI stuff nowadays calls this tool. The usual DEL key didn’t work but after several reboots and key presses I ended up in some windows boot menu that allowed me to boot from an USB stick. Only, it didn’t. It told me there was a secure boot failure and stopped.

Turning the computer off and on again, this time I apparently got the BIOS setup key right: F2 (It didn’t work the first several times I tried it, why?) I got something called “Insydeh” which looked like a BIOS of old. And there it was: An option to turn off “secure boot”, only it was disabled. I could only switch to BIOS mode which I didn’t want to. WTF?

Google to the rescue again: To turn off secure boot, you first must set a supervisor password. So I did that, came back to the secure boot screen and lo and behold, the option to turn it off was enabled now. After turning it off, I could clear the supervisor password and the option was still enabled. Another setting I changed was the F12 boot menu. It was disabled by default so I enabled it.

Save and reboot, press F12 and – voila – a boot menu which finally allowed me to boot clonezilla from my USB stick. The backup is running now.

Praise Microsoft for requiring PC manufacturers to have an option to turn off secure boot if they want to be Windows 8 compliant (I wonder whether that will still be a requirement for Windows 10, though.). But curse Microsoft and the bloody PC manufacturers to come up with the pretty much useless secure boot feature at all. It’s my computer, I paid for it, so it should be my choice to install whatever operating system I want on it!

by dummzeuch at November 26, 2014 03:14 PM

Firebird News

Firebird on 64-bit ARM Hardware (Ubuntu)

ARMv8 X-Gene X-C1 Development Systems, powered by Ubuntu 14.04 LTS, now available through Applied Micro’s developer enablement program. And you can install Firebird arm64 port on it

by mariuz at November 26, 2014 02:07 PM

The Wiert Corner - irregular stream of stuff


A long while ago, I posted a detailed answer on what functions the default comparers actually were calling to get a feel for if they would apply or not answering delphi – What does the default TArray.Sort comparator actually do and when would you use it? – Stack Overflow.

I needed that information recently because of some sorting issues I bumped into (sorting generic records), so finally a blog post.

First some links to documentation for even more background information:

There is the answer I gave:

David did a great job of textually describing how the default comparers work, but for some of you it might be easier to follow when you see how the underlying code is structured (and decide if the default comparers do apply).

I will cover only the Compare_ style of comparisons. The Equals_ style works in a similar way.

What happens is that _LookupVtableInfo selects an IComparer interface for Compare_ style comparisons (and a IEqualityComparer for Equals_ style).

Underneath those interfaces are not ordinary interfaces, but interface wrappers around global functions of this form for Compare_ style:

function Compare_t<T>(Inst: Pointer; const Left, Right: T): Integer;

and global procedures of this form for Equals_ style:

function Equals_t<T>(Inst: Pointer; const Left, Right: T): Integer;
function GetHashCode_t<T>(Inst: Pointer; const Left, Right: T): Integer;

The outcome of Compare_ style functions is straightforward, but slightly different from -1, 0, +1 that some people might expect:

< 0 for Left < Right
= 0 for Left = Right
> 0 for Left > Right

For the majority of cases, the implementation is very simple:

I have grouped the Compare_ style functions by how they do this.

  • Ordinal types (including enumerators and Int64).
  • Floating point (Real) types (including Comp and Currency).
  • Short strings (from the Turbo Pascal / Delphi 1 days).
  • Wide strings (the OLE style ones).
  • Methods.
  • Pointers (including Classes, Interfaces, Class References and Procedures).

(Ordinal types outside the range of 1, 2, 4, 8 bytes, and real types outside the range of 4, 8, 10 bytes raise an error as they are illegal).

The first group just subtracts Left from Right Right from Left: signed/unsigned integers of 1 or 2 bytes length

function Compare_I1(Inst: Pointer; const Left, Right: Shortint): Integer;
function Compare_I2(Inst: Pointer; const Left, Right: Smallint): Integer;
function Compare_U1(Inst: Pointer; const Left, Right: Byte): Integer;
function Compare_U2(Inst: Pointer; const Left, Right: Word): Integer;

  Result := Left - Right;

The second group does a comparison:

function Compare_I4(Inst: Pointer; const Left, Right: Integer): Integer;
function Compare_I8(Inst: Pointer; const Left, Right: Int64): Integer;
function Compare_U4(Inst: Pointer; const Left, Right: LongWord): Integer;
function Compare_U8(Inst: Pointer; const Left, Right: UInt64): Integer;
function Compare_R4(Inst: Pointer; const Left, Right: Single): Integer;
function Compare_R8(Inst: Pointer; const Left, Right: Double): Integer;
function Compare_R10(Inst: Pointer; const Left, Right: Extended): Integer;
function Compare_RI8(Inst: Pointer; const Left, Right: Comp): Integer;
function Compare_RC8(Inst: Pointer; const Left, Right: Currency): Integer;
function Compare_WString(Inst: PSimpleInstance; const Left, Right: WideString): Integer;
function Compare_Pointer(Inst: PSimpleInstance; Left, Right: NativeUInt): Integer;

  TPS1 = string[1];
  TPS2 = string[2];
  TPS3 = string[3];
  OpenString = type string;
  TPS1 = string;
  TPS2 = string;
  TPS3 = string;

function Compare_PS1(Inst: PSimpleInstance; const Left, Right: TPS1): Integer;
function Compare_PS2(Inst: PSimpleInstance; const Left, Right: TPS2): Integer;
function Compare_PS3(Inst: PSimpleInstance; const Left, Right: TPS3): Integer;
// OpenString allows for any String[n], see
function Compare_PSn(Inst: PSimpleInstance; const Left, Right: OpenString): Integer;

  if Left < Right then
    Result := -1
  else if Left > Right then
    Result := 1
    Result := 0;

function Compare_Method(Inst: PSimpleInstance; const Left, Right: TMethodPointer): Integer;
  LMethod, RMethod: TMethod;
  LMethod := TMethod(Left);
  RMethod := TMethod(Right);
  if LMethod < RMethod then
    Result := -1
  else if LMethod > RMethod then
    Result := 1
    Result := 0;

Now we get to the interesting bits: the not-so-straightforward outcomes.

Strings use CompareStr. If you want something different, you can use TOrdinalIStringComparer

function Compare_LString(Inst: PSimpleInstance; const Left, Right: AnsiString): Integer;
function Compare_UString(Inst: PSimpleInstance; const Left, Right: UnicodeString): Integer;

  Result := CompareStr(Left, Right);

BinaryCompare is used for:

  • binary data including unknown, Char/WChar, Set, Array, Record. Exception if the binary data is 1, 2 or 4 bytes size in x86 and x64 and 8 bytes in x64, it will be compared as integers.
  • dynamic carrays (be careful when they are multi-dimensional!).
  • variants as a last resort (see further below)

For records that can be compared, it makes sense to perform operator overloading, and have the comparer use those operators.

Binary data of 1, 2, 4 or 8 bytes is an exception, which will give strange results on little-endian machines (Intel x86 and x64, and bi-endian Arm in little-endian mode):

function Comparer_Selector_Binary(info: PTypeInfo; size: Integer): Pointer;
  case size of
    // NOTE: Little-endianness may cause counterintuitive results,
    // but the results will at least be consistent.
    1: Result := @Comparer_Instance_U1;
    2: Result := @Comparer_Instance_U2;
    4: Result := @Comparer_Instance_U4;
    {$IFDEF CPUX64}
    // 64-bit will pass const args in registers
    8: Result := @Comparer_Instance_U8;
    Result := MakeInstance(@Comparer_Vtable_Binary, size);

The rest is pure binary:

function Compare_Binary(Inst: PSimpleInstance; const Left, Right): Integer;
  Result := BinaryCompare(@Left, @Right, Inst^.Size);

function Compare_DynArray(Inst: PSimpleInstance; Left, Right: Pointer): NativeInt;
  len, lenDiff: NativeInt;
  len := DynLen(Left);
  lenDiff := len - DynLen(Right);
  if lenDiff < 0 then
    Inc(len, lenDiff);
  Result := BinaryCompare(Left, Right, Inst^.Size * len);
  if Result = 0 then
    Result := lenDiff;

As usual, Variants are in a league of their own. First VarCompareValue is tried. If that fails, then Compare_UString is tried. If that fails too, BinaryCompare is tried. If that fails: tough luck.

function Compare_Variant(Inst: PSimpleInstance; Left, Right: Pointer): Integer;
  l, r: Variant;
  lAsString, rAsString: string;
  Result := 0; // Avoid warning.
  l := PVariant(Left)^;
  r := PVariant(Right)^;
    case VarCompareValue(l, r) of
      vrEqual:        Exit(0);
      vrLessThan:     Exit(-1);
      vrGreaterThan:  Exit(1);
        if VarIsEmpty(L) or VarIsNull(L) then
  except // if comparison failed with exception, compare as string.
      lAsString := PVariant(Left)^;
      rAsString := PVariant(Right)^;
      Result := Compare_UString(nil, lAsString, rAsString);
    except  // if comparison fails again, compare bytes.
      Result := BinaryCompare(Left, Right, SizeOf(Variant));


Filed under: Ansi, Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development, Unicode

by jpluimers at November 26, 2014 05:00 AM

November 25, 2014

The Wiert Corner - irregular stream of stuff


Using Delphi build-events (see my post Delphi prebuild/prelink/postbuild events), you can automate the process of signing your Delphi executables with a digital certificate.

Below the steps for signing Windows executables.


  1. You have your digital certificate in a PFX file.
    (for testing you can use a self-signed certificate, for the real world you want a certificate leads to a CA).
  2. You have the Windows SDK installed that provides SignTool.
    (in this case, I presume a Windows 7 or 8 x64 machine with the Windows Software Development Kit (SDK) for Windows 8 installed. If not, you have to change the path in the various statements, for instance when using the Windows SDK: Download the Windows SDK for Windows 7 and More | MSDN.)

The post-build event code

You need this SignTool call in your post-build event:

"C:\Program Files (x86)\Windows Kits\8.0\bin\x86\signtool.exe" sign /f path-to-PFX-file /p password /t time-stamp-server-URL "$(OUTPUTPATH)" /d "name to sign with" /du URL-to-your-web-site

/d and /du are optional

For more examples see Everything you need to know about Authenticode Code Signing – IEInternals – Site Home – MSDN Blogs.

Note you can run signtool in wizard style as well, but that is cumbersome in a post-build event.

Passwords and digital certificates

When your EXE is signed, and traced back to a certificate authority, people should be able to trust the EXE really is from you or your company.

That means it is very important to guard the signing process, and make sure other people cannot sign their (potential malicious software) with your digital certificate.

A big warning is in place here:

Be very careful storing the digital certificate and password used for signing. If they are under version control, make sure few people have access to it, and prevent people from having access to them at the same time unless absolutely necessary.

Security is a serious thing, so this is not the place to elaborate much on security. I’ll mention a few starting points with more information:

And on what could happen if organizations that deal with certificates get compromised:


If the timestamping server is unavailable, or you do not timestamp at all, you get an error message like this.

The timestamping is done with servers over the internet. Which means they might not be available 24×7, so it can be worthwhile to harden the signing script.

User flobadob – Stack Overflow gave a good example of that in timestamp – Alternative timestamping services for authenticode – Stack Overflow.

There are 2 protocols that signtool can use for timestamping: Authenticode (with the /t parameter) and RFC3161 (with the /tr parameter).

Authenticode compatible URLs:

RFC1361 compatible URLs:

For more background information read these:

A bit more on PFX files

Often, certificates and keys start as other file pairs and you need to convert them. Two examples:

If you want a self-signed PFX file for testing purposes, then read what Roger Lipscombe answered at StackOverflow to security – How do I create a self-signed certificate for code signing on Windows? – Stack Overflow.


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at November 25, 2014 05:00 AM

November 24, 2014

Te Waka o Pascal

Visual Studio Pro for just $0 !!!

Not exactly hot off the presses but some people apparently seem still to be unaware that my suggestion for a Community Edition of Delphi has been picked up (some years later, mind you). Except that it isn’t Embarcadero that have picked it up, but Microsoft. The Deal Just Got Better Some might recall that a […]

by Jolyon Direnko-Smith at November 24, 2014 07:45 AM

November 21, 2014

Firebird News

Conference Report Firebird 2014 and presentations

On October 24-25, 2014 in Prague, we hosted an international conference of Firebird. Attended by 110 participants, 18 speakers presented 23 interesting presentations. The conference was open with core developers of Firebird Dmitry Emanov and Vlad Khorsun, with reports about new features of Firebird 3, which is preparing to release in early 2015, and Firebird […]

by mariuz at November 21, 2014 09:24 AM

November 20, 2014

The Wiert Corner - irregular stream of stuff


Please someone add the Software on a String blog to DelphiFeeds (:

Great article on testing implementations of interfaces in a generic way. With examples in NUnit and DUnit.

How do I test an interface? Should I even do that? | Software on a String.

And then Stefan Glienke made a great comment at making the DUnit implementation even easier:

But even if you go without that extra base class the cool thing is that you don’t need to restrict your classes to be a TInterfacedObject but specify the interface they need to implement (yay, compiletime type safety) and then you can get rid of the Supports call and directly assign the result of the ctor call to the sut variable.


Stefan’s code:

Filed under: Delphi, Delphi 2007, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at November 20, 2014 11:00 AM


Ever since the Delphi build engine got changed to MS Build in Delphi 2007, many people use Delphi build events. Their order is prebuild, prelink and postbuild (or maybe better spelled pre-build, pre-link and post-build).

Before Delphi 2007, you had to fiddler with project groups and dependencies to fake pre-build and post-build events. For an example see Pre and Post-Build Automation in Delphi.

One of the really good things about these events is that build events appear in the output tab of the messages window.

One of the really bad things is that there is hardly any documentation about the build events.

At least two important things are missing:

  1. How the lines of a build event are actually executed
  2. How parameter expansion works inside build events

Let’s explain these.

Executing the source lines of a build event.

I can cut this short very easily: build events are not batch files.

What happens is that all lines in your build event are concatenated together using ampersand (&) signs which are used to execute multiple commands on one command line.

This means that all the fancy control structures (if statements, setlocal, for loops) are not possible inside build events.

The alternative is to call a batch file from a build event, and have your control structures there.

But for that, you have to pass parameters, which leads to the expansion of $() parameters:

Expansion of the $() parameters inside build events

I could not find any official documentation of the $() parameters on the Embarcadero sites.

Ken White took the effort to type the parameters from Delphi 2010 into a StackOverflow answer (that list is gone in Delphi XE, but the bug reports on that got fixed in Delphi XE2 and up), and since then they have not changed:

BDS                 The environment variable $(BDS)
DEFINES             The project's conditional defines
DIR                 The environment variable $(DIR)
INCLUDEPATH         The project's include path
INPUTDIR            The input file's directory
INPUTEXT            The input file's extension
INPUTFILENAME       The input file's name, with extension
INPUTPATH           The input file's full path
LOCALCOMMAND        Local command entered by user in project manager
OUTPUTDIR           The output file's directory
OUTPUTEXT           The output file's extension
OUTPUTFILENAME      The output file's name, with extension
OUTPUTNAME          The output file's name, without extension
OUTPUTPATH          The output file's full path
Path                The environment variable $(PATH)
PROJECTDIR          The project's directory
PROJECTEXT          The project's extension
PROJECTFILENAME     The project file's name, with extension
PROJECTNAME         The project's name
PROJECTPATH         The project file's full path
SAVE                Save the input file to disk before it's compiled
SystemRoot          The environment variable $(SYSTEMROOT)
WINDIR              The environment variable $(WINDIR)

A nice list, but it doesn’t tell you what the values are (apart from the environment variables). So I compared the output of build-events like this:

>> %temp%\pre-build.txt echo BDS: $(BDS)
>> %temp%\pre-build.txt echo Config: $(Config)
>> %temp%\pre-build.txt echo DEFINES: $(DEFINES)
>> %temp%\pre-build.txt echo DIR: $(DIR)
>> %temp%\pre-build.txt echo INCLUDEPATH: $(INCLUDEPATH)
>> %temp%\pre-build.txt echo INPUTDIR: $(INPUTDIR)
>> %temp%\pre-build.txt echo INPUTEXT: $(INPUTEXT)
>> %temp%\pre-build.txt echo INPUTFILENAME: $(INPUTFILENAME)
>> %temp%\pre-build.txt echo INPUTNAME: $(INPUTNAME)
>> %temp%\pre-build.txt echo INPUTPATH: $(INPUTPATH)
>> %temp%\pre-build.txt echo LOCALCOMMAND: $(LOCALCOMMAND)
>> %temp%\pre-build.txt echo OUTPUTDIR: $(OUTPUTDIR)
>> %temp%\pre-build.txt echo OUTPUTEXT: $(OUTPUTEXT)
>> %temp%\pre-build.txt echo OUTPUTFILENAME: $(OUTPUTFILENAME)
>> %temp%\pre-build.txt echo OUTPUTNAME: $(OUTPUTNAME)
>> %temp%\pre-build.txt echo OUTPUTPATH: $(OUTPUTPATH)
>> %temp%\pre-build.txt echo Path: $(Path)
>> %temp%\pre-build.txt echo Platform: $(Platform)
>> %temp%\pre-build.txt echo PROJECTDIR: $(PROJECTDIR)
>> %temp%\pre-build.txt echo PROJECTEXT: $(PROJECTEXT)
>> %temp%\pre-build.txt echo PROJECTFILENAME: $(PROJECTFILENAME)
>> %temp%\pre-build.txt echo PROJECTNAME: $(PROJECTNAME)
>> %temp%\pre-build.txt echo PROJECTPATH: $(PROJECTPATH)
>> %temp%\pre-build.txt echo SAVE: $(SAVE)
>> %temp%\pre-build.txt echo SystemRoot: $(SystemRoot)
>> %temp%\pre-build.txt echo WINDIR: $(WINDIR)
"$(INPUTDIR)Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.bat" "$(Platform)" "$(INPUTDIR)..\..\..\..\..\\FullDebugMode DLL\Precompiled\" "$(OUTPUTDIR)"

I ran it using the project C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.dproj

The objective was to copy the correct FastMM FullDebugMode DLL into the directory of the .EXE (more on that later).

Observations of the events:

  • pre-link is not executed
  • pre-build and post-build get executed
  • pre-build and post-build give the same output

Output of pre-build.txt converted to a html table (too bad you cannot have code or pre tags around a table tag):

BDS c:\program files (x86)\embarcadero\rad studio\11.0
Config Debug
INCLUDEPATH c:\program files (x86)\embarcadero\rad studio\11.0\lib\Win64\release;C:\Users\Developer\Documents\RAD Studio\11.0\Imports;c:\program files (x86)\embarcadero\rad studio\11.0\Imports;C:\Users\Public\Documents\RAD Studio\11.0\Dcp\Win64;c:\program files (x86)\embarcadero\rad studio\11.0\include;C:\Program Files (x86)\FastReports\LibD18x64;C:\Program Files (x86)\Raize\CS5\Lib\RS-XE4\Win64
INPUTDIR C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\
INPUTFILENAME Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.dproj
INPUTNAME Copy_FastMM_FullDebugMode_Dll_PostBuildEvent
INPUTPATH C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.dproj
OUTPUTDIR C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\Win64\Debug\
OUTPUTFILENAME Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.exe
OUTPUTNAME Copy_FastMM_FullDebugMode_Dll_PostBuildEvent
OUTPUTPATH C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\Win64\Debug\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.exe
Path C:\Users\Public\Documents\InterBase\redist\InterBaseXE3\win32_togo;C:\Users\Public\Documents\InterBase\redist\InterBaseXE3\win64_togo;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\Redist\boost\win64;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\Redist\boost\win32;C:\Program Files (x86)\CollabNet;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\bin;C:\Users\Public\Documents\RAD Studio\11.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\bin64;C:\Users\Public\Documents\RAD Studio\11.0\Bpl\Win64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseHg\;C:\BIN
Platform Win64
PROJECTDIR C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent
PROJECTFILENAME Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.dproj
PROJECTNAME Copy_FastMM_FullDebugMode_Dll_PostBuildEvent
PROJECTPATH C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent.dproj
SystemRoot C:\Windows
WINDIR C:\Windows

Observations of the values

Partially lowercase:

  • INCLUDEPATH: c:\program files (x86)\embarcadero\rad studio\11.0\lib\Win64\release;C:\Users\Developer\Documents\RAD Studio\11.0\Imports;c:\program files (x86)\embarcadero\rad studio\11.0\Imports;C:\Users\Public\Documents\RAD Studio\11.0\Dcp\Win64;c:\program files (x86)\embarcadero\rad studio\11.0\include;C:\Program Files (x86)\FastReports\LibD18x64;C:\Program Files (x86)\Raize\CS5\Lib\RS-XE4\Win64


  • BDS: c:\program files (x86)\embarcadero\rad studio\11.0
  • INPUTEXT: .dproj
  • OUTPUTEXT: .exe
  • PROJECTEXT: .dproj


  • DIR:
  • SAVE:

Ends with backslash:

  • INPUTDIR: C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\
  • OUTPUTDIR: C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent\Win64\Debug\

No backslash:

  • PROJECTDIR: C:\Users\Developer\SVN\\Native\Delphi\Apps\Copy_FastMM_FullDebugMode_Dll_PostBuildEvent

I tried these Intel based platforms in Delphi XE4:

  • Platform: OSX32
  • Platform: Win32
  • Platform: Win64

So that’s where the Copy_FastMM_FullDebugMode_Dll_PostBuildEvent came in (:

Future research

I need to put some more research into where these values are filled, and how you can pass your own to the MSBUILD process.

According to name, with extension INPUTPATH The input file’s full path LOCALCOMMAND Local command entered by user in project manager OUTPUTDIR The output file’s directory OUTPUTEXT – CodeInPro
and What are the MSBuild project level properties for Delphi? – Stack Overflow,
many values are set in
but that has since then moved to files named like this:
C:\Program Files (x86)\Embarcadero|CodeGear\RAD Studio\*.0\bin\CodeGear.*.Targets

Nobody seems to know about $(LOCALCOMMAND): Article 10854 Subject D2010 Build Events – Use of $(LOCALCOMMAND)? Where does it come from? on embarcadero.public.delphi.ide.


Filed under: Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, FastMM, Software Development

by jpluimers at November 20, 2014 05:00 AM

November 19, 2014

Firebird News

Firebird Foundation members are eligible for discounts

The Firebird Foundation (FF) is the organization behind Firebird that actually pays for the salaries of the core developers. FF gets its money from associations, donations and sponsorship. Anyone can become a member of the FF (USD 50/year for non voting member, and USD 300/year for voting member) and every member of the FF are eligible for special […]

by Cantu at November 19, 2014 01:25 PM

100 Open Source replacements for expensive software

Firebird is listed in the “100 Open Source Replacements for Expensive Applications” article: 31. Firebird Replaces Microsoft SQL Server Standard ($899 and up) Under development for more than three decades, Firebird is a relational database that boasts “excellent concurrency, high performance, and powerful language support for stored procedures and triggers.” Paid support is available through […]

by Cantu at November 19, 2014 12:08 PM

Did you purchased XE Plus Pack?

If you previously purchased XE Plus Pack and have moved onto Delphi XE2 or above, please contact me for you free upgrade license details.


XE Plus Pack ONLY works with Delphi XE.

The XE2 Plus Pack and above (the name changes for the supported IDE) is not free.

I have no plans to make it free. However, a license purchased for XE2 Plus Pack (or above) will work with any Embarcadero released IDE from Delphi XE2. So the same key will work with XE3, XE4, XE5, XE6, XE7 (see below) and even XE8 if that is what the next release will be called…

XE7 Plus Pack

The Delphi XE7 Plus Pack is currently in beta and was held back due to Update 1. It should be available to trial in a week or so.

Existing users can contact me for access to the beta.


by JED at November 19, 2014 07:14 AM

The Wiert Corner - irregular stream of stuff


A while ago I bumped into a funny problem with Delphi XE.

I moved all the code from the .dpr in a Main unit (the IDE sometimes overwrites part of the DPR).

This normally isn’t a problem, until Delphi re-generates the .RES file. The reason is that this .RES file can contain a manifest which enables Windows theming.

If there is no reference of the Application object in the .DPR, the IDE will remove the Theming manifest from the .RES file, so your application run unthemed.

Three solutions:

  • include a reference to the Application in the .dpr,
  • or add the XPMan unit to the uses list  (no need to put the TXPManifest on a form or datamodule),
  • or upgrade to Delphi XE2 or newer.

You don’t see the effect until the IDE does regenerate the RES file. Which it will do when you change the version information. Which you had to do for the new build.
Took some effort to find the actual steps that overwrote the RES. It’s kind of undocumented.

Note: this happens at least in Delphi XE, and probably in Delphi 2005-2009 as well.

It was fixed in Delphi XE2, where you can even choose your own .manifest file which is great, because besides theming, you can also control UAC through the manifest.

Note: if you want an UAC manifest, you

  1. have to create your own manifest containing the requestedPrivileges and requestedExecutionLevel nodes.
  2. merge it with any theming manifest
  3. make sure you don’t have another theming manifest included (remove all XPMan references from your code, don’t use the Themed manifest in the project options).

From Delphi XE2 and up, just reference the manifest file from the project options. For XE and below, create an RC file referencing the manifest, compile the RC into a RES and include the RES in your application.


Filed under: Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at November 19, 2014 05:00 AM

The Podcast at

What is the Internet of Things?

You’ve no doubt seen talk of the Internet of Things, or the Internet of Everything even, but you may still wonder what it is. Well, it isn’t a product or a feature you will buy, it has more in common with the “information age” or “industrial revolution” then “smart phone” or even the Internet itself.

It took me a while to warm up to the idea. At first I thought it was just marketing hype, but now I am really excited and see it as part of a huge trend that is going to really change life as we know it. In fact we’ve already seen a lot of the changes. The Internet of Things (IoT) isn’t something coming someday; it is something already here and is only going to get bigger.

Gartner's 2014 Hype Cycle of Emergine Technologies

Gartner says we are 5 to 10 years away from seeing the full productivity of IoT


The basic idea is that all sorts of “ordinary things” get connected to the Internet, but I believe that really misses the point. IoT is really the combination of four technologies: The cloud, computer miniaturization & commoditization, smart devices, and ubiquitous connectivity. I’d say ubiquity is a theme of IoT. These four technologies have been gaining steam individually, but as they come together we see massive changes.

Over the next few blog posts we can discuss each technology individually, and then we can discuss what they mean together. I’d love to hear your feedback along the way.

Did you know RAD Studio XE7 is great for building apps that connect with the Internet of Things? I’ll discuss that more in some of my future posts, but right now there are a lot of great special offers that make upgrading to XE7 a no brainer. I’d feel bad if you missed these special offers because you were waiting for me to get to the point. If you just download and activate the trial by Nov 21st you get a free copy of Nick’s book.

by Jim McKeeth at November 19, 2014 12:17 AM

November 18, 2014

The Wiert Corner - irregular stream of stuff


This should not be difficult to do, just time consuming. So it is on my research list to see how time consuming: build a TXMLDocument binding for OmniXML.

This is to urge less people to try to parse XML by hand like xml – Copy & Copy does not work correctly with stringlist – Stack Overflow.


via: Delphi, OmniXML – XML binding? – Stack Overflow.

Filed under: Delphi, Delphi XE4, Delphi XE5, Development, Software Development, XML/XSD

by jpluimers at November 18, 2014 05:00 AM

November 17, 2014

Delphi Bistro

Delphi Jobs available in Alabama, NY, Paris and Seattle

If  you want to come work for the coolest company that writes software using your favorite language, then now is the time to send me  your resume! Email it to afletcher at wideorbit dot com.

If you have a lot of Delphi experience, as well as SQL experience, send me your resume (afletcher at wideorbit dot com). You owe it to yourself to take a chance at working for a great company that has a team of great people that love Delphi as much as you do!

C’mon, you owe it to yourself,  take the first step and Send me your resume (afletcher at wideorbit dot com) and I’ll personally deliver it to the right person.

Positions are open in Lynnwood, WA (Seattle area), Birmingham (AL), New York (NY) and Paris (France).

You must be able to work in the US  for he American positions and the EU for the French position.

by Fletch at November 17, 2014 09:21 PM

November 16, 2014

Castle Game Engine news

New exciting Spine improvements in our Castle Game Engine! Spine allows to create great 2D game animations...

New exciting Spine improvements in our Castle Game Engine!

Spine allows to create great 2D game animations, that can be used within our engine. For example uses Spine with our engne :) New wiki page documents Spine support in the Castle Game Engine.

Recently implemented Spine features:

1. Slot color and transparency can be animated.

2. Slot draw order can be animated (by "draw order timeline").

3. Using Spine model without an atlas is possible. Expects images in images/<attachment-name>.png files. Note that without atlas, we lose some speed (texture switching) and even quality (textures may be resized to power-of-2 on some GPUs; atlas avoids it by always creating an atlas page with power-of-2). So atlas is still advised, although it is not required anymore.

4. Start of skinnedmesh support. The skinnedmesh in setup pose is affected by bones correctly, and during animation it moves as a whole (is affected by parent bone transformation). Missing is the ability to recalculate vertexes affected by bones during animation (that is, to deform skinnedmesh during animation).

5. NavigationInfo.blendingSort X3D extension allows to force blending sort by VRML/X3D author to NONE, 2D, 3D. Spine models automatically include blendingSort=2D, so they just open Ok in view3dscene ( You may find useful to use blendingSort=3D for 3D scenes where there are many transparent 3D objects visible over each other.

November 16, 2014 01:29 AM

November 15, 2014

Firebird News

FDB Python driver for Firebird v1.4.3 is available for download.

This mostly bugfix version introduces a backward incompatible change to events API, so read the Release Notes before deployment.

by mariuz at November 15, 2014 09:08 AM

November 14, 2014

Firebird News

IBSurgeon FBMonLogger 1.5 is released

IBSurgeon is glad to announce the general availability of FBMonLogger 1.5. IBSurgeon FBMonLogger is a tool to analyse monitoring tables output in Firebird and find problems with slow SQL queries, wrongly designed transactions (long-running transactions, transactions with incorrect isolation level, etc) and identify problematic applications.  More details about FBMonLogger: FBMonLogger is included into IBSurgeon […]

by IBSurgeon News at November 14, 2014 06:56 PM

November 13, 2014

The Wiert Corner - irregular stream of stuff

Firebird News

IPv6 support support landed in Firebird 3.0 trunk

IPv6 support is now landed in firebird trunk , please test ipv6 support from Firebird 3.x snapshots for Linux and Windows. Thanks to Michal Kubecek for his contribution

by mariuz at November 13, 2014 06:54 AM

The Wiert Corner - irregular stream of stuff


A while ago, I wrote a via PowerShell script to show the component packages (BPL) files for all installed Delphi (actually: BDS) versions for a couple of reasons:

  • I was creating installation instructions for getting new development machines set-up
  • The new machines had to either have a minimum subset of installed Delphi versions  + components, or the maximum superset of all the existing development machines
  • Sifting through the installed Packages in the IDE, or registry by hand was cumbersome

Note that in the mean time (I queued this blog entry somewhere in 2013) the script has moved to BitBucket, I’ve written more scripts (like Dependencies.bat which is documented in and Run-Dependend-rsvars-From-Path.bat), all modified all scripts to support all BDS versions I had access to, and a write nice conference paper on Build Automation for Delphi that references the scripts.

Since none of the machines were using pre BDS installations, I could limit the script to BDS 1.0 and up.

The very first (1.0) version of BDS (also known as the Gailileo IDE foundation) was in fact not a Delphi version, but C# Builder 1.0. All Delphi versions since then are based on BDS. The script is based on the BDS registry keys I researched and wrote about in Files in your Delphi settings directory; How to relocate the Favourites on your Welcome page.

Since registry access can be very much flow based, the pipeline architecture of PowerShell is a good fit.

So I wrote a PowerShell script (:

Note Thomas Mueller has written a batch file around the same set of registry keys; the thread there also has some insight in the HKLM versus HKCU keys.

I will explain my script step by step, and start with the most important one: Set-StrictMode -Version Latest.

By default, PowerShell is very lenient. You’d think that is a good thing for PowerShell novices, but in practice it isn’t. It might be a good thing for PowerShell gurus (I’m far from that), but the default configuration makes PowerShell not complain until it really has no clue what you actually did wrong.

A few things that causes Set-StrictMode (you have to hack around to implement Get-StrictMode)  to stop with an error are at Powershell: Set-StrictMode -Version Latest.:

Set-StrictMode -Version Latest

PowerShell script best practices has some other tips on what you should add in the header of your scripts, and for legacy code: Set-StrictMode and legacy code issues.

Set-StrictMode -Version Latest

Main code at the end of your script

The functions in the file can be tested one-by-one in this block at the end of the file (you can only call functions declared earlier in the file), and indicate the versatility of this PowerShell file:


Registry paths, default parameters and error handling

Most functions have default parameter values, in these cases virtually everywhere the base registry path for BDS 8.0 (Delphi XE)

I know that you can specify Registry keys without quotes, but I’m accustomed using quotes in other languages, so I use quotes in PowerShell too.

One of the things that can happen is that you do not have all BDS editions installed on one machine, so one of the registry paths does not exist.

I’ve used -ErrorAction SilentlyContinue here to convert this potential error condition into a $null response which is handled by the if statement.
More detailed advice on such error handling can be found at Managing non-terminating errors – Windows PowerShell Blog – Site Home – MSDN Blogs.

Another thing you will see a lot in my script is hashes (#) in front of lines that I used for debugging purposes. A great feature of PowerShell is that anything you do not return, but produces something will be sent to the standard output. So removing the hashes below will reveal the content of $key and a table formatted $nameValues as text. Nice!

Note I use the “Known Packages” key, but skip the “Known IDE Packages” key. That is explained by Allen Bauer in Why my Delphi IDE Expert is not initialized when use the “Known IDE Packages” Key? – Stack Overflow and Mark Edington in his post Mark Edington’s Delphi Blog : Delphi Startup Times and the Kitchen Sink about Delphi personalities.

function Get-KnownPackages {
        [string]$basePath = 'hkcu:\Software\Embarcadero\BDS\8.0'
    $path = $basePath + '\Known Packages'
    $key = Get-Item $path -ErrorAction SilentlyContinue
    if ($key) {
        # $key
        $names = $key.GetValueNames()
        $namevalues = $names |
            ForEach-Object { [PSCustomObject]@{ Name = $_; Value = $key.GetValue($_) } }
        # $namevalues | Format-Table
    else {
        $namevalues = $null

Matching with Regular Expressions

Sifting through the packages, I wanted to know which ones were system installed (by the Delphi installer), and user installed. My empiric observation was that all packages installed into directories starting with $(BDS) or $(BDSLIB).

Since searching with -match or -notMatch involves regular expressions, the dollar and parenthesis need to be escaped, so you end up with \$(BDS) or \$(BDSLIB).

function Filter-BDS-Packages {
        [string]$basePath = 'hkcu:\Software\Embarcadero\BDS\8.0',
        [boolean]$excludeMatch = $True
    $namevalues = Get-KnownPackages($basePath)

    if ($nameValues) {
        $bdsBinAtStart = '^\$\(BDSBIN\)'
        $bdsAtStart = '^\$\(BDS\)'
        if ($excludeMatch) {
            $matches = $namevalues | Where-Object {
                $_.Name -notMatch $bdsBinAtStart -and `
                $_.Name -notMatch $bdsAtStart
        else {
            $matches = $namevalues | Where-Object {
                $_.Name -match $bdsBinAtStart -or `
                $_.Name -match $bdsAtStart
    else {
        $matches = $null

The next step is getting BDS Versions, product and company names. I’m following the lists from Files in your Delphi settings directory; How to relocate the Favourites on your Welcome page here.

First the singular versions of the functions.

Most of these use the PowerShell switch statement to map from BDS version to CompanyName.

function Get-BDS-CompanyName {
    param (
        $bdsVersion = 1
     CompanyName=Borland (from BDS 1 until BDS 5)
     CompanyName=CodeGear (from BDS 6 until BDS 7)
     CompanyName=Embarcadero (BDS 8 and up)
    $borland = 'Borland'
    $codeGear = 'CodeGear'
    $embarcadero = 'Embarcadero'
    switch ($bdsVersion) {
        1 { return $borland }
        2 { return $borland }
        3 { return $borland }
        4 { return $borland }
        5 { return $borland }
        6 { return $codeGear }
        7 { return $codeGear }
        Default { return $embarcadero }

function Get-BDS-ProductName {
    param (
        $bdsVersion = 1

    switch ($bdsVersion) {
        1       { 'C# Builder' }
        Default { 'Delphi' }

function Get-BDS-ProductVersion {
    param (
        $bdsVersion = 1

    switch ($bdsVersion) {
        1 { '1' }
        2 { '8' }
        3 { '2005' }
        4 { '2006' }
        5 { '2007' }
        6 { '2009' }
        7 { '2010' }
        8 { 'XE' }
        9 { 'XE2' }
        10 { 'XE3' }
        11 { 'XE4' }
        12 { 'XE5' }

and some of them use string formatting using the -f format operator:

function Get-BDS-BaseKeyPath {
    param (
        $bdsVersion = 1,
        $rootKey = 'hkcu'
    $company = Get-BDS-CompanyName $bdsVersion
    $pathFormat = '{0}:\Software\{1}\BDS\{2}.0'
    # 'hkcu:\Software\Embarcadero\BDS\8.0' $True
    $path = $pathFormat -f $rootKey, $company, $bdsVersion

function Get-BDS-ProductFullName {
    param (
        $bdsVersion = 1
     1. Borland C# Builder (contained only C# Builder)
     2. Borland Delphi 8 (added Delphi .net)
     3. Borland Delphi 2005 (added Delphi win32)
     4. Borland Delphi 2006 (added C++ Builder)
     5. Borland Delphi 2007
     6. CodeGear Delphi 2009 (Unicode; not a platform, but still)
     7. CodeGear Delphi 2010 (Generics done well)
     8. Embarcadero Delphi XE
     9. Embarcadero Delphi XE2 (added Delphi win64)
     10. Embarcadero Delphi XE3 (added C++ Builder win64, OS X x86 and iOS x86/arm through FreePascal)
     11. Embarcadero Delphi XE4 (replaced FreePascal with native Delphi compiler for iOS x86/arm)
     12. Embarcadero Delphi XE5 (added Android ARMv7)
    $company = Get-BDS-CompanyName $bdsVersion
    $name = Get-BDS-ProductName $bdsVersion
    $version = Get-BDS-ProductVersion $bdsVersion
    $fullNameFormat = '{0} {1} {2}'
    $fullName = $fullNameFormat -f $company, $name, $version

some are really simple calls to other methods (note that parameters in PowerShell are space separated, not comma separated):

function Get-BDS-HKCU-BaseKeyPath {
    param (
        $bdsVersion = 1
    $path = Get-BDS-BaseKeyPath $bdsVersion

function Get-BDS-HKLM-BaseKeyPath {
    param (
        $bdsVersion = 1
    $path = Get-BDS-BaseKeyPath $bdsVersion 'hklm'

The plural versions of the methods just call the singular versions, except for Get-BDS-Versions which initializes an array.

For arrays, I prefer strong typing. Instead of using @() to initialize an empty untyped array, I use [int[]] for a strongly typed array.

<pre>function Get-BDS-CompanyNames {
    $versions = Get-BDS-Versions
    $versions | ForEach-Object { Get-BDS-CompanyName $_ }

function Get-BDS-Versions {
    ## array initialization:
    [int[]] $versions = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

function Get-BDS-ProductNames {
  $versions = Get-BDS-Versions
  $versions | ForEach-Object { Get-BDS-ProductName $_ }

function Get-BDS-ProductVersions {
    $versions = Get-BDS-Versions
    $versions | ForEach-Object { Get-BDS-ProductVersion $_ }

function Get-BDS-ProductFullNames {
    $fullNames = Get-BDS-FullNames
    $fullNames | ForEach-Object { Get-BDS-ProductFullName $_ }

function Get-BDS-BaseKeyPaths {
    param (
        $rootKey = 'hkcu'
    $bdsVersions = Get-BDS-Versions
    $bdsVersions | ForEach-Object {
        $path = Get-BDS-BaseKeyPath $_ $rootKey

function Get-BDS-HKCU-BaseKeyPaths {
    $bdsVersions = Get-BDS-Versions
    $bdsVersions | ForEach-Object {
        $path = Get-BDS-HKCU-BaseKeyPath $_

function Get-BDS-HKLM-BaseKeyPaths {
    $bdsVersions = Get-BDS-Versions
    $bdsVersions | ForEach-Object {
        $path = Get-BDS-HKLM-BaseKeyPath $_

Finally, there is the Filter-BDS-Packages-For-All-Versions function which brings everything together.

It loops over user/system installed packages (parsing the PowerShell $True and $False boolean constants (though there are other ways to specify TRUE and FALSE in PowerShell).

The cool thing about arrays is that you can push them through pipes with ForEach-Object instead of classic for or do loops.

Every once in a while, you get this error when formatting output in PowerShell:

Object of type “Microsoft.PowerShell.Commands.Internal.Format.FormatStartData” is not valid or not in the correct sequence. This is likely caused by a user-specified “format-table” command which is conflicting with the default formatting.

It hardly occurs, but the trick solving only the symptom is to perform a pipe through Out-String to force the output into a series of strings. If anyone knows about the actual cause, please let me know. Especially if you also know how to resolve (:

Boolean not is either the ! or the -not operator. But since all other PowerShell logical operators start with a minus sign, I used -not for consistency.

There is also some $state debugging code left behind the # comment markers. Uncomment these when you want to trace through the code.

Finally a small trick: $anyInstalledPackages is used to mark if any packages have been found at all. If you have no Delphi or no packages installed, it will stay $False, and an appropriate message will be shown.

function Filter-BDS-Packages-For-All-Versions {
    $anyInstalledPackages = $False
    [bool[]]$filters = $True, $False
    $filters | ForEach-Object {
        $filter = $_
        $versions = Get-BDS-Versions
        $versions | ForEach-Object {
            $version = $_
            $basePath = Get-BDS-HKCU-BaseKeyPath $version
            # $state = [PSCustomObject]@{ Version = $version; Filter = $filter; Path = $basePath }
            # $state
            $userPacakgesNameValues = Filter-BDS-Packages $basePath $filter
            if ($userPacakgesNameValues) {
                $productFullName = Get-BDS-ProductFullName $version
                switch ($filter) {
                  $False  { $kind = 'System' }
                  Default { $kind = 'User' }
                $line = '{0} installed packages for "{1}" in {2}' -f $kind, $productFullName, $basePath
                Write-Host $line
                $userPacakgesNameValues | Format-Table | Out-String
                $anyInstalledPackages = $True
    if (-not $anyInstalledPackages) {
        Write-Host 'No installed Delphi packages found'

<span style="font-size: 12px; line-height: 18px;">

Finally the test code again:


Have fun with it!


Filed under: CommandLine, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, PowerShell, Software Development

by jpluimers at November 13, 2014 05:00 AM

November 12, 2014

Firebird News

Latest QA Tester/Developer’s Reports

You can read Developers reports from previous months (until September/October) Pavel Zotov, 2014-10 Philippe Makowski, 2014-10 Alexander Potapchenko, 2014-10 Alex Peshkov,2014-10 Jiri Cincura,2014-10 Other Core developer reports ps:I didn’t remember to be posted here on FirebirdNews . You can view also the presentation/reports from Firebird conference

by mariuz at November 12, 2014 04:05 PM

The Wiert Corner - irregular stream of stuff


One of the things with Delphi and version control systems is that you’d rather have as few binary files in version control as possible.

One of the binary files in virtually every Delphi project is the RES file.

By default, it contains version information, and the icon for the project.

The compiler supports RC files, it’s just the IDE that insists on RES.

So on my research list is how to move everything to RC, and limit the IDE dependency on the RES files.


via: How to store a large text in a Delphi component? – Stack Overflow.

Filed under: Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at November 12, 2014 05:00 AM

November 11, 2014

The Wiert Corner - irregular stream of stuff


One of the things a lot of Delphi users want is to be able to automagically remove unused units from their uses lists and projects.

The short answer is: you can’t.

The long answer starts with: you can’t fore a number of reasons.

Similar reasonings hold for many other development environments. Plain Windows EXEs and DLL dependencies. .NET projects and assembly dependencies, etc.

Initialization/Finalization dependency

The first reason is that each unit (module, assembly, or other dependency) can contain global code to be executed at unit start/load or finish/unload.

So even though you do not reference anything inside that unit, the initialization and finalization sections can be run.

Removing the dependency from your units and project, kills that functionality. And might break all sorts of things.

Load order dependency

Sometimes you have subtle load order dependencies of units. Those should be rare, and if they are there, should be enforced by the affected units themselves. But everyone knows those subtle dependencies are more often a by product not enforced by anything than coincidence.

So if you start removing references, the load order might change, and subtle bugs may occur.

In other words: test, test, test and test your codebase before and after removing unit references from uses lists.


If you understands the dependencies of initializtion/finalization or load order, you will get interested to know what units are actually being used.

The ultimate source for this would be the Delphi compiler. Bad luck here: you cannot use it as the IDE and command-line interfaces don’t offer a hook to it to do just this.

So you need alternative parsers that can help out. The answers to How to remove unused units from all source files on Delphi XE2 describe a few and they all have the same drawback: they are not the Delphi compiler, so they are a rough approximation of what the compiler would do.

And even if the approximation would be perfect, they all suffer from the same thing the compiler suffers from: you can only have one set of conditional defines, platforms, etc at the same time.

There is lots of code for which the usage is conditional, but where the uses list does not reflect this.


Optimizing uses lists to eliminate unused units seems a simple thing at start, but isn’t.

The best way to keep those optimized is to prune them while developing. So if you remove code, try to remember cutting down the uses lists by hand.

And then test, test, test and test your codebase.


via: ide – How to remove unused units from all source files on Delphi XE2? – Stack Overflow.

Filed under: Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at November 11, 2014 05:00 AM

November 10, 2014

Firebird News

Do you want Bitnami to add Firebird support?

Bitnami is a library of popular server applications and development environments that can be installed with one click, either in your laptop, in a virtual machine or hosted in the cloud. We take care of compiling and configuring the applications and all of their dependencies (third-party libraries, language runtimes, databases) so they work out-of-the-box. The […]

by Cantu at November 10, 2014 12:51 PM

twm’s blog

Setting a default language with dxgettext

By default, if no translation for a language is available, dxgettext will not do any translation but use the strings as they are in the source code. Sometimes this is not desirable. e.g.

  • Your customer does not understand the source language (e.g. your source language is not English but say German)
  • You are using dxgettext to convert special characters from a placeholder (e.g. “(R)” or “[deg]”) to the actual character (“®” or “°”)

In these cases you’d probably want the translation to default to a language that is actually supplied.

dxgettext doesn’t seem to have this feature (I looked quite hard) so I implemented it myself.

unit u_dzTranslator;


// ... other stuff ...

/// Sets the language to use </summary>
procedure UseLanguage(_LanguageCode: string);

/// gets a list of languages for which translations are available </summary>
procedure GetListOfLanguages(const _Domain: string; _Codes: TStrings;
  _Languages: TStrings = nil);

/// Sets the language to use if the desired language is not available,
/// defaults to English </summary>
procedure SetDefaultLanguage(const _LanguageCode: string);

// ... other stuff ...



// ... other stuff ...

  gblDefaultLanguage: string = DEFAULT_LANGUAGE;

procedure UseLanguage(_LanguageCode: string);
  Codes: TStringList;
  CurLang: string;
  i: Integer;
  p: Integer;

  CurLang := gnugettext.GetCurrentLanguage;
  Codes := TStringList.Create;
    GetListOfLanguages('default', Codes);
    for i := 0 to Codes.Count - 1 do begin
      if SameText(CurLang, Codes[i]) then begin
        // There is a translation for this language and country, everything is fine
        Exit; //-->
    // no translation found, try without the country code
    p := Pos('_', CurLang);
    if p 
 0 then begin
      CurLang := Copy(CurLang, 1, p - 1);
      for i := 0 to Codes.Count - 1 do begin
        if SameText(CurLang, Codes[i]) then begin
          // There is a translation for this language but not country, we can live with that
          Exit; //-->

  // we found no translation for this language, so we use the default language

procedure SetDefaultLanguage(const _LanguageCode: string);
  if _LanguageCode = '' then
    gblDefaultLanguage := DEFAULT_LANGUAGE
    gblDefaultLanguage := _LanguageCode;

procedure GetListOfLanguages(const _Domain: string; _Codes: TStrings; _Languages: TStrings = nil);
  i: Integer;
  gnugettext.DefaultInstance.GetListOfLanguages(_Domain, _Codes);
  if Assigned(_Languages) then begin
    for i := 0 to _Codes.Count - 1 do begin

// ... other stuff ...


Apart from the obvious, that is, setting a unit global variable to the desired default language, which itself defaults to English, this code changes the way UseLanguageWorks. It now does:

  • Call gnugettext.UseLanguage to let gnugettext do its stuff
  • Call gnugettext.GetCurrentLanguage to get the language that gnugettext uses (just in case gnugettext changes it from what was set with UseLanguage).
  • Gets a list of all supported translations
  • Tries to find a matching translation for the desired language and country.
  • If not found, tries to find a matching translation for the desired language, ignoring the country
  • If not found, changes the language to the default language.

Note that I just wrote this code, it might still contain bugs and is probably far from perfect. I will put it into the unit u_dzTranslator of my dzlib library and will fix any bugs I find in the future there.

by dummzeuch at November 10, 2014 11:16 AM

November 07, 2014

Žarko Gajić

Displaying Long Non-Breakable Text (File Path) In MessageDlg – Truncation/Ellipsis Issues

Introduced way back in Delphi 2009 the TTaskDialog (defined in Dialogs.pas) implements task dialogs. Task dialogs first appeared in Windows Vista and are used in later Windows versions. In essence, a task dialog is similar to, while much more flexible and parameter-rich than the standard message dialog. You’ve surely seen such fancy dialogs in action: those containing message title and text (content), icons, push buttons, radio buttons, expandable footer area and more.

In Delphi we have several options (including ShowMessage, MessageDlg, Application.MessageBox and some more) when it comes to displaying some modal message to the user. I’m rarely using ShowMessage and Application.MessageBox as both are not as flexible as MessageDlg (actually ShowMessage internally calls MessageDlg).

MessageDlg: Bruce Banner or Hulk ?

Using MessageDlg can result in 2 different displays of the actual message dialog. What will get displayed (and more importantly how) to the user is dependent on several factors including the following: Windows version your application is running on, if the application was built including runtime themes and if Windows uses themes.

If your application is running on Windows XP, MessageDlg internally creates and displays a standard Delphi form (though set to look and work as a dialog). If your application is running on at least Windows Vista (therefore Windows Vista, 7, 8, 10, etc) and runtime themes are enabled and used by Windows, MessageDlg will internally create the shiny task dialog! Actually, the TaskDialogIndirect API call will be made. Even though this beast of a function has many parameters and options, MessageDlg will only take advantage of a few (title, text, buttons).

Finally, you end up simply using MessageDlg and Delphi determines if an old school dialog form is to be created or the new more nicer task one. Problem solved, let’s move on to other bugs… Well, not so fast!

TaskDialog Width & Long Text Truncation

One of the nasty features of TaskDialog internal implementation is that it will try to determine on its own what should be the width of the dialog. The text you specify to be displayed will be wrapped and displayed in several lines. This is, of course, something you would expect.

However! If the text to be displayed is constructed entirely of non-breakable characters (no spaces and alike) and is longer than some 50 (or so) characters, the display will get truncated and ellipses will be injected into the final display!?! TaskDialogs do not grow in width if “more” text is to be displayed – they grow in height and truncate/ellipsesize the message text. Old school dialog form on Windows XP will grow in width until it reaches screen size – and will not truncate the message for the user in any way!

Truncation / Ellipsesization Visualized

I’m running this on Windows 7, themes enabled.

I need to display the full file name of a file where the path does not contain any spaces (which seem to be default “wrap here” characters). Let’s pretend this file should be displayed (has some 250 characters, no intervening spaces) in a dialog:

  LongFileName = '\\server\sub-folder-name\folder0123456789folder0123456789\another-folder\morefolders\a-directory\another-directory\morefolders\morefolders\a-directory\another-directory\morefolders\a-directory\another-directory\somefile-using-hypens-in-long-filename.txt';

First, using the TTaskDialog component and only setting a few properties:

TaskDialog1.Caption := 'TaskDialog1';
TaskDialog1.CommonButtons := [tcbOk];
TaskDialog1.Text := LongFileName;

Result :

Trying with MessageDlg as

  Format('This file has a very long path: %s', [LongFileName]), 
  mtInformation, [mbOk], -1);


Proof that MeesageDlg uses TaskDialog internally :)

Btw, you cannot set the width of the MessageDlg. Neither the “TDF_SIZE_TO_CONTENT” seems to help.

I Don’t Need (read: Want) No Truncation!

I really, really want to display the entire file path to the user with no truncation and ellipses.

Let’s try using the WrapText (SysUtils.pas) function:

    'This file has a very long wrapped path: %s',
  mtInformation, [mbOk], -1);


Better! Note that WrapText has 2 overloads and the more simple one has a property “MaxCol” which defaults to 45 (have no idea why).

However, 45 is not enough, I want the line to be some 80 or so characters, so trying with the following

    'This file has a very long wrapped path: %s',
    [WrapText(LongFileName), 80]), 
  mtInformation, [mbOk], -1);

Oh no! Again, truncation and ellipses – why oh why?!

Finally, after spending too much time on all this I’ve decided for the next option as the kind-of-I-can-live-with-it best one:

UseLatestCommonDialogs (not in this occasion, please)

Getting away from the whiny new task dialog and disabling UseLatestCommonDialogs:

UseLatestCommonDialogs := false;
    'This file has a very long wrapped at 80 path: %s', 
    [WrapText(LongFileName, 80)]),
  mtInformation, [mbOk], -1);
UseLatestCommonDialogs := true;


I’m not too happy with this – as the old school/style dialog is displayed – but I simply have to show the full file path to the user: no truncation or ellipses are allowed for me.

Do you have any idea how this can be better solved?

(I’m not looking for another 3rd party solution or some special one-time workarounds)

by zarkogajic at November 07, 2014 04:04 PM

The Wiert Corner - irregular stream of stuff


While researching the manifest problem I will post about next week, I made a short list of free Windows Resource Editors:

All other resource editors I found were not free, and someof them not maintained for an even longer period than the free ones.


Filed under: Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

by jpluimers at November 07, 2014 05:00 AM

November 06, 2014

Castle Game Engine news

New features of our build tool for Windows...

New features of our build tool for Windows programs: we now automatically include an icon and create version information and manifest in the exe file. This makes exe files compiled using our build tool look again modern on new Windows versions :) The author and icon information in CastleEngineManifest,xml will also be reused for packaging on other platforms, e.g. for Android apk, Mac OS X application bundle and so on.

November 06, 2014 06:28 PM

The Wiert Corner - irregular stream of stuff


The last couple of weeks I taught two sessions at both ITDevCon 2014 in Milano, Italy and EKON 2014 in Köln, Germany.

The EKON materials are slightly more up to date and elaborate (sessions there were 75 minutes), so below are all the links.


  • I’ve switched to Markdown for presenting as that is very version control friendly
  • GitHub very good at handling relative links from your Markdown files to other resources, that I’ve switched the Conference repository to GitHub from BitBucket.
  • Somewhere over the next few months, the repository will convert from Mercurial to Git and also move to GitHub.

Unit testing:

Directory with documents:

Document page:


Build Automation:

Directories with documents:

Actual document pages:


Enjoy it!


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at November 06, 2014 11:00 AM

Firebird News

GoLang driver supports Firebird wire protocol 11

GoLang firebird driver suports firebird wire protocol 11 (implemented in firebird 2.1) More info via nakagami’s blog

by mariuz at November 06, 2014 09:26 AM

The Wiert Corner - irregular stream of stuff


Two interesting links today about Delphi and Batch files.


PS: If you want to see some serious Batch file and PowerShell related scripts, then read through the Build Automation part of my session materials I posted to ITDevCon and EKON session materials on Delphi Unit Testing + Build Automation and Continuous Integration on-line.

More details are in the batch files here:

and PowerShell scripts here:

Filed under: Batch-Files, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Scripting, Software Development

by jpluimers at November 06, 2014 05:00 AM

November 05, 2014

twm’s blog

When CloseHandle does not close the handle

Today I spent several hours hunting down a problem with opening a COM port. Basically the program opens a COM port, writes some bytes to it, reads an answer and closes it again. This determines whether the expected device is connected to the COM port or not.

If the answer is the expected one, so the device is connected and active, the detection loop exists (the COM port has been closed using CloseHandle).

Now the actual communication with the device starts. The first thing is does, is open the same COM port again. Which fails with the error code 5 (ERROR_ACCESS_DENIED). WTF?

Of course, I tried to debug the issue using the Delphi integrated debugger. While I stepped through the code, the error disappeared, only to come back when I just run the code without stepping through it. This was reproducible (I love reproducible errors.).

When something like this happens, you can be sure it is a timing issue. Either your program is multithreaded and the issue is one thread doing something while the other is doing something else that conflicts with the first thread (called race condition or deadlock, depending on the outcome). Or it’s not your own threads but somebody else’s.

In my case this StackOverflow question seems to be about the same issue and the accepted answer was mentioning the FTDI drivers I am using (the COM port is actually a USB serial adapter). These drivers apparently do not immediately close the port when the handle is closed so opening it again can fail. It turned out that a retry loop when opening the COM port solved the issue. Here is the code I ended up using:

procedure TCustomComPort.CreateHandle;
  MAX_TRIES = 10;
  Tries: integer;
  OK: boolean;
  Tries := 0;
    FHandle := CreateFile(
      PChar('\\.\' + FPort),
    OK := (FHandle 
    if not OK then
      Sleep(10 * Tries); // it wasn't enough to Sleep(10) here
  until OK or (Tries >= MAX_TRIES);

  if not OK then
    CallException(CError_OpenFailed, GetLastError);

Some of you might recognize part of this code from the ComPort library for Delphi and C++. (But probably not, because the original code is just three lines. ;-) )

Of course the real debugging was more complex than I described above because the program is multi threaded and the detection is done in one thread while the actual communication is done with the foreground thread writing to the port and the answers being processed by a background thread. So of course, at first I suspected an error in my code, actually found one, fixed it, just to run into the next problem. Finally it turned out to be the driver problem described here.

by dummzeuch at November 05, 2014 05:49 PM

The Wiert Corner - irregular stream of stuff


An interesting statement by Steve Maughan:

Looking at how many High DPI awareness or lack of is the developers Y2K of our time.

Looking at the trouble Windows and Windows applications in general have with High DPI (more in general: resolution independence). I think it rates even higher: as the EUR introduction problem of our time.

What do you think?


via High DPI awareness is must have feature for XE8. Not only for Delphi IDE, but….

Filed under: .NET, C++, Delphi, Development, Software Development, WPF

by jpluimers at November 05, 2014 05:43 PM

Firebird News

PyFirebirdsql Version 0.9.5 is released with Wire Protocol 11

PyFirebirdsql Version 0.9.5 is released with Firebird Wire Protocol 11 support. More info via nakagami’s blog Firebird Wire Protocol 11 was introduced in Firebird 2.1 What is left is protocol 12 introduced in Firebird 2.5 Protocol 13 is already implemented (Firebird 3.0)

by mariuz at November 05, 2014 03:08 PM

IBO 5.5.5 Build 2152 Released

Jason Wharton wrote on ibolist: I have released a new version of IB Objects. The primary objective of this release is to provide support for RAD Studio XE7. There have been some bugs fixed as well. Please see the release notes for details:

by mariuz at November 05, 2014 12:26 PM

The Wiert Corner - irregular stream of stuff

The kind of text that the Delphi IDE often removes in a .dpr file.

Vin Colgin posted on G+:

The kind of text that the Delphi IDE often removes in a .dpr file.

The kind of text that the Delphi IDE often removes in a .dpr file.

FastMM4 and lines in the *.dpr

I’ve got an old problem, in which the IDE will take the lines required out of the “uses” clause in the *.dpr. Something I’m sure we’re all aware of, but is there a solution to keep it from doing it?

The comments indicate the problem is less severe in more recent Delphi versions:

Daniela Osterhagen Actually it has become much better. The IDE doesn’t meddle as much with the DPR files as it used to.

One option for solving this issue is adding a new unit as the first entry that permanently stays there and moving the ifdef to that unit.

That’s what I did a long time ago and even put on-line, and even put it on-line at CodePlex as FastMM4BootstrapUnit.pas. Too bad CodePlex isn’t indexed on Google, so I commented this:

I’m using a FastMM4BootstrapUnit for that at the top of my DPR; it  looks like this […]

It will eventually end up at my repository any way.Let me know if you need it there soon, and I can probably get something published after the Entwickler Konferenz next week.

So various people are now using this:

  • Vin Colgin:  very nice. Thanks for the tip!
  • Warren Postma: This works fine for me in xe6 and up.
  • Bruce McGee: Nice. May I steal this? And by “steal”, I mean giving credit in the code comments.

Since I could use this unit during my EKON 2014 talk about Delphi Unit Testing, I expedited the publication:

And explained the usage in this Unit testing session session materials.

Note: this file isn’t indexed either (as BitBucket doesn’t allow it), but since the repository will be git based in the foreseeable future anyway, I can then move it to GitHub which does allow Google to crawl the master branch.


via FastMM4 and lines in the *.dpr I’ve got an old problem, in which the IDE….

Filed under: Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at November 05, 2014 11:00 AM

Firebird News

ANN: Firebird PHP Generator 14.10 released

SQL Maestro Group announces the release of Firebird PHP Generator 14.10, a frontend to generate feature-rich CRUD web applications for your Firebird database. The software comes in both Freeware and Professional editions. This major release introduces new and updated controls, powerful JavaScript API, enhanced customization features, user-defined authorization, new application level events, multi-group menus and […]

by SQL Maestro Team at November 05, 2014 07:33 AM

The road to Delphi

VCL Styles Utils – Major Update (Dialogs, ProgressBar, DateTimePicker, ListView and more)

A Major updated was made to the VCL Styles Utils project. This version include several fixes and new features.


The Vcl.Styles.Hooks unit is the most updated part of this new release. This unit is the responsible of hook some of the UxTheme and WinApi methods like DrawThemeBackground, GetSysColor and GetSysColorBrush. Which allows take the control of the painting process for the system themed (and owner-draw) controls.


This new release fix the highlight color used on the selected items and also replace the themed checkBox by a styled checkbox.

ListView with VCL Styles
2014-11-04 11_08_19-Demo

ListView with VCL Styles + Vcl.Styles.Hooks unit
2014-11-04 11_08_55-Demo

Also was added support for style the Listview groups.

ListView with VCL Styles

2014-11-04 11_11_23-Demo

ListView with VCL Styles + Vcl.Styles.Hooks unit

2014-11-04 11_12_45-Demo

DateTime Controls

The Styling of the TMonthCalendar and TDatetimepicker components is one of the limitations of the VCL Styles, because such components are owner-draw by the system and doesn’t allow to customize the look and feel when the native themes are enabled (for more information read these TMonthCalendar and TDatetimepicker ) also only the newest versions of Delphi includes a partial styling support for such components. With this new release the styling of these controls is now possible.

TDateTimePicker and TMonthCalendar with VCL Styles

2014-11-04 11_29_24-Demo - RAD Studio XE7 - uMain [Running] [Built]

TDateTimePicker and TMonthCalendar with VCL Styles + Vcl.Styles.Hooks unit

2014-11-04 11_54_31-Demo - Embarcadero RAD Studio XE2 - Vcl.Styles.Hooks [Running] [Built]


Improved support for the TProgressbar component without flicker and with Marquee style.

2014-11-04 14_48_10-Demo

Select Directory Dialog

The styling for the select directory dialog was enhanced adding support for the open and close glyphs and fixing the color of the highlight bar.

VCL Styles Utils

2014-11-04 15_01_14-Browse For Folder

VCL Styles Utils + Vcl.Styles.Hooks unit

2014-11-04 15_01_52-Greenshot

Open/Save Dialog

The VCL Styles support of the Open and Save dialogs was improved adding styling for groups and highlight items. Also a fix for the select folder combobox was introduced.

VCL Styles Utils

2014-11-04 15_12_50-Open

2014-11-04 15_20_49-Open

2014-11-04 15_26_07-ThemedSysControls - Embarcadero RAD Studio XE2 - ThemedSysControls.dproj [Runnin

VCL Styles Utils + Vcl.Styles.Hooks unit

2014-11-04 15_14_27-Open

2014-11-04 15_21_25-Open

2014-11-04 15_25_16-Edit Post ‹ The Road to Delphi - a Blog about programming — WordPress

by Rodrigo at November 05, 2014 02:02 AM

The Podcast at

Developing on the Samsung Gear Live Smart Watch

Previously I created a blog post about using Delphi and RAD Studio XE7 to develop for the Moto 360. The new FireUI Multi Device Designer (MDD) makes is a breeze to design for the new smaller UI. I’ve since updated the FireUI Devices project on GitHub to cover the Samsung Gear Live & LG-G watches in addition to the Moto 360.

I thought I would walk through the steps for developing with the Samsung Gear Live. One advantage it has over the Moto 360 is that it has a physical USB cable connection, so you don’t need to deploy via BlueTooth. This makes for a much faster deploy cycles. With a USB cable though, you need to install the ADB USB Drivers.

  1. Put the device in USB Debugging Mode
    1. Hold the home / side button until the settings menu appears (couple seconds)
    2. Select About and tap Build Number until it notifies you that developer options are enabled.
    3. Swipe left to right to go back
    4. Select Developer Options and enable USB Debugging.
  2. You still need to have the watch paired with a phone via the Android Wear app since the confirmation dialog is displayed there.
  3. Run the SDK Manager / Android Tools and Make sure you have Android SDK Tools, Platform-tools and Build tools updated (this moves the ZipAlign.exe, so you need to tell the IDE where to find it.)
  4. Install the Samsung Android USB Driver for Windows
  5. Gear Live should appear as an Other Device in device manager once you connect it to windows via USB.
  6. Select Update Driver Software
  7. Browse my computer for Driver software
  8. Let me pick from a list of device drivers on my computer
  9. Then select ADB Interface
  10. Select SAMSUNG Android ADB Interface
  11. On your phone you will see a dialog “Allow Wear Debugging” Check “Always allow .. . ” and then select OK.

Gear Live - Device Manager Driver Update


Once you have done all of that, it will show up in your IDE as a target, and when you load the FireUI custom device for it, then you will have a great design surface for it too.

GearLive in XE7 IDE


And you are ready to build your Gear Live app with Delphi XE7.

Delphi XE7 on the Samsung Gear Live

I’m sure I’ll have more coverage on Android Wear in the coming months too.

by Jim McKeeth at November 05, 2014 01:03 AM

November 04, 2014

Firebird News

Firebird Django 1.7 support (experimental)

Maximiliano Robaina wrote on django-firebird-dev list I just upload a new branch into the main repository. This new branch “develop” [1] has the implementation to support django 1.7. I’ll like have got some feedback about it, so just clone the repo and switch to “develop” branch to try with django 1.7. Let me know what […]

by mariuz at November 04, 2014 04:16 PM

twm’s blog

class as interface: Operator not applicable to this operand

Once in a while I run into this problem and every single time it takes me forever to remember the cause:

Say, you have got an interface and a class implementing that interface:

  IMyInterface = interface
    function asMyInterface: IMyInterface;

  TMyClass = class(TInterfacedObject, IMyInterface)
    function asMyInterface: IMyInterface;


function TMyClass.asMyInterface: IMyInterface;
  Result := Self as IMyInterface; // compile error here

This will fail to compile in the marked line with the error “Operator not applicable to this operand type”.

The reason is simple: In order for the as operator to work on interfaces, the interface must have a GUID assigned to it. You do that in the Delphi IDE by positioning the cursor after the interface keyword and press Shift+Ctrl+G. As soon as your interface declaration looks like this …

  IMyInterface = interface ['{93903D10-58F7-41B0-AFB1-2A8E17F828EF}']
    function asMyInterface: IMyInterface;

… the code will compile.

(Don’t just copy this code, you will need to generate your own unique GUID as described above! Otherwise you will experience strange things.)

by dummzeuch at November 04, 2014 03:11 PM

The Wiert Corner - irregular stream of stuff


Like any long term project (Spring4D took about 5 years to release version 1.0 and still needs a lot of mobile polising) the “Delphi Parallel Library” took a long time to complete.

It got incorporated as the “Parallel Programming Library” in Delphi XE7.

Since the documentation is thin (like Spring4D <g>), but the posts about “Delphi Parallel Library” (those started in 2008!) give a lot of background information.

Hence the reminder to self.

Now I need to compare this to the Omni Thread Library for Delphi (which is on version 3+ now) one day (:

(PPL is cross platform whereas OTL is not, but there must be much more differences).


Filed under: Delphi, Delphi XE7, Development, Software Development

by jpluimers at November 04, 2014 11:41 AM


Normally you would not want to use a reserved word as an identifier. But sometimes it can be very convenient, for instance for a code generator that wraps remoting calls or does ORM.

Both Delphi and C# have an escape for this:

The prefixes are to tell the compiler knows you really know what you are doing, and are using a reserved word as an identifier.

The cool thing: in the Run Time Type Information (Delphi) or Reflection (C# and VB.NET) you will see the names without the prefix.

Some examples from StackOverflow:

& prefix for Delphi

private &string: Integer;

Kenny Cason answered delphi – Is it possible to use reserved words for field names? – Stack Overflow.

@ prefix for C#

private long @string;

Jon Skeet answered Use the long reserved word as a variable name in C# – Stack Overflow.

[] embedding for VB.NET

Private [string] As Integer;

Tobias Wittenburg asked – Reserved Keyword in Enumeration in C# – Stack Overflow.

The VB.NET way also works in Microsoft SQL Server and Microsoft Access.

“” embedding in many SQL syntaxes


Exception: Microsoft SQL Server and Microsoft Access use [] embedding.


Some SQL implementations uses the embedding not only to allow for reserved words, but also to allow embedding spaces in identifiers.

Delphi, C# and VB.NET cannot do that, so be aware of that when performing ORM work.


Filed under: .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 7.0, VB.NET 7.1, VB.NET 8.0, VB.NET 9.0

by jpluimers at November 04, 2014 05:00 AM

November 03, 2014

Firebird News

New Documentation Development funding – New button labelled : Fund Docs using PayPal.

Donation page is now updated so you can contribute to that sepecific fund On 31 October, 2014, the Firebird Project released the Firebird 2.5 Language Reference in Russian, a large documentation task sponsored by Moscow Exchange, one of the biggest Firebird users in the world, and IBSurgeon (tools and services for Firebird). Several Russian-speaking […]

by mariuz at November 03, 2014 02:05 PM

Firebird 2.5.3 updated in #Debian unstable with fb_guard lock file permissions fixes

Firebird 2.5.3 is updated in Debian unstable with minor security fixes Here is the changelog : * add patch tightening fb_guard lock file permissions (Closes: #767497) Thanks to Holger Levsen *-super.postinst: tighten permissions on existing fbguard lock file * declare conformance with Debian Policy 3.9.6

by mariuz at November 03, 2014 09:54 AM

Database .NET 13.5 released

Database .NET is an innovative, powerful and intuitive multiple database management tool, With it you can Browse objects, Design tables, Edit rows, Export data and Run queries with a consistent interface. New features and improvements from 13.1 to 13.5 (2014/11/03) Added Binding Procedure and Function parameters Added Binding SQL variables Added (De)Compression and (De)Encoding strings […]

by fishcodelib at November 03, 2014 06:40 AM

October 31, 2014

Firebird News

Firebird Language Reference in Russian is ready. Do you need it in English?

Firebird Project is pleased to announce that Firebird 2.5 Language Reference in Russian language is released. It is available on Firebird SQL Documentation page. Why it is only in Russian and how to get it in English? The answer is the following: Moscow Exchange, one of the biggest Firebird users in the world, and IBSurgeon […]

by mariuz at October 31, 2014 02:23 PM

The Wiert Corner - irregular stream of stuff


Last week, I viewed to webinars. A smaller one Geek Fest – Automating the ForgeRock Platform Installation about Ansible installation of Unix machines, and the first 70% of the last day ofCodeRage 9 | Free Development Event by Embarcadero.

Both had a bad experience because of GoToWebinar has a really bad user experience.

  1.  When a GoToWebinar connection terminates, the GoToWebinar client closes. You loose everything in the Q&A log. You need to hope someone else saved the Q&A log so you can see the public questions, but the private comments you made are gone.
  2. It is impossible to install the Windows client when you are behind a McAfee Web Gateway that filters downloads and HTTPS traffic. After trying for about 15 minutes, we gave up and reverted back to a Mac over another connection. It meant we could not use the conference room and had to cram many people behind a small MacBook screen.
  3. The Mac OS X client does not allow you to resise the Q&A log, so even on a 4k display, you can see like 10 lines of Q&A.
  4. When there are many attendees, the refresh rate slows down from sub second to once per 5-10 seconds, this is really bad when watching demos of software: a big aim of webinars.

When terminating, the only thing GoToWebinar allows you to do is give feed back (too bad they don’t allow for detailed feed back). So I gave it 0 out of 5 stars.


PS: I could save the below Q&A logs. If you have other logs, please let me know so I can publish them. I’m especially interested in Have You Embraced Your Inner Software Plumber Yet? by David Schwartz – The Tool Wiz

These are the  CodeRage 9 – Object Pascal Sessions I could save the Q&A log of:

Filed under: Appmethod, Chrome, Delphi, Delphi XE7, Development, FireFox, Internet Explorer, Power User, Software Development, Web Browsers Tagged: GoToWebinar

by jpluimers at October 31, 2014 06:24 AM

October 30, 2014

The Wiert Corner - irregular stream of stuff



Creating Beautiful Animations in your Desktop and Mobile Applications

The session demonstrates how to create beautiful timeline-based animations in Object Pascal using the Mitov Software’s AnimationLab.

Level: All
Boian Mitov – Mitov Software


Welcome to CodeRage 9 – Object Pascal Track! Track Schedule:

Audience Question

  • Q: It’s unfortunate that GoToMeeting only shows about 1 frame a second, which doesn’t do justice to the animations that the author is trying to show.
  • A: :-( They look great here.

Audience Question

  • Q: about Codesite have there been session in previous Coderage ?
  • A: I believe so.

Audience Question

  • Q: Of COURSE the animations look great over there. You are seeing them at a much faster frame rate than GTM transmits!
  • A: :-D

Audience Question

  • Q: WOW! Great components Boian, In the FireMonkey edition, can any descendant of TShape, such as Raize new Radiant components?
  • A: It works with any component via LiveBindings.

Audience Question

  • Q: Please, tell about Mitov.Runtime library.
  • A: Contact Boain for more information

Audience Question

  • Q: Is your SignalLab able to be used on Android and iOS?
  • A: Not yet, but coming soon.

Audience Question

  • Q: I dont find info about Mitov.Runtime on the homepage. Where can we find more info about it?
  • A: Email Boian. It isn’t published yet.

Audience Question

  • Q: Is there some video capture possibilities now, harvesting the activity together with speech to make videos from lessons etc. etc. (Like those made to prepare this lesson)
  • A: Perhaps.

Audience Question

  • Q: Do you support XE7?
  • A: Absolutely.

Audience Question

  • Q: Do you support XE7?
  • A: in Prerelease. Just finishing documentation.

Audience Question

  • Q: What are the different effects in the Physics engine?
  • A: Mass and drag (like fluid) effects only. Feel free to suggest other effects

Audience Question

  • Q: In the past ~2007 I had tried to use Myour lab for signal processing like FFT with scopes etc. but found it was not able to get support. Looks like that time in the past and Mitov now is a mature company and doing well.
  • A: Hope so.

Audience Question

  • Q: Is open wire in firemonkey
  • A: Yes, supports both VCL & FireMonkey, so works with non-visual too.

Audience Question

  • Q: Did I hear right – no iOS support?
  • A: Correct. Just don’t have an iOS device to develop and test on. Looking for it come in about a month.

Audience Question

  • Q: Thanks for great demo!
  • A: :-)

Audience Question

  • Q: Thank you!
  • A: :-)

Audience Question

The registered user download page

Audience Question

Audience Question

Audience Question

Audience Question

  • Q: Yes, got a refreshing today :-)
  • A: :-)

Audience Question

  • Q: yes its in the list
  • A: :-)

Audience Question

  • Q: There is nothing special in converting from VCL to FireMonkey from XE6 to XE7… that’s why…
  • A: :-)

Audience Question

  • Q: thanks
  • A: :-)

Audience Question

  • Q: ^ mida xe7
  • A: Thanks!

Audience Question

Audience Question


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Delphi, Delphi XE7, Development, Software Development

by jpluimers at October 30, 2014 09:05 PM



Advanced RTTI in Object Pascal

Runtime Type Information RTTI has always been a core feature of Delphi. But until recently, it was complex and limited. Now, RTTI is significantly more powerful, and yet much easier to use as well. This session describes in detail all of the changes that have been made and demonstrates the new capabilities with several examples including field inspection, method invocation, and custom attributes.

Level: Intermediate
Ray Konopka – Raize Software


 Q: I’ve put all of today’s chat logs at my blog indexed at

A: Great, thanks so much!

Audience Question

Q: If I should advise another tool nice for both program development, database development, project administration and brainstorming, it would be Mindjet Mind Manager 2014 Plus with Spigit Engage :-)

A: Nice

Audience Question

Q: Wirth what version of Delphji was extended RTTI introduced?

A: Delphi 2010

Audience Question

Q: Is there some literature on marshaling vs php on Linux servers? I now use a tool in Jedi JVCL for serializing using html/xml alike structures.

A: You can use RTTI

Audience Question

Q: Grate stuff, I can build new computer language by it!

A: :-)

Audience Question

Q: Is it possible to retrieve RTTI for strict private members?

A: Follow up with Ray via email.

Audience Question

Q: Using RTTI to access (private) fields directly would violate proper OO design. It would be better to have only the public fields, properties and methods being exposed/emitted by default.

A: Just because you can, doesn’t make it a good idea. Sounds like just the public properties are exposed by default.

Audience Question

Q: Can I use the adv. RTTI with any of my existing classes ? Like serializer for my classes ?

A: Should be able to.

Audience Question

Q: Is it possible to get class helper functions with RTTI ?

A: Not sure.

Audience Question

Q: Is it possible to get class helper functions with RTTI ?

A: Probably. Would need to experiment and see.

Audience Question

Q: The example of RttiMethod would work nice if you spell Create correctky, but perhaps you should have som try except to catch misspelled method names :-)

A: Good idea.

Audience Question

Q: Really great talk, Ray!

A: :-)

Audience Question

Q: Is there any way to add a field to an object? If no, what the best way to simulate?

A: maybe, with an agregate. Depends on what you are trying to solve.

Audience Question

Q: what is the immediate use of RTTI if i have the source code and can access all controls and data structures in code?

A: There are a lot of uses.

Audience Question

Q: support for records as well or just the classes ?

A: Records should have RTTI in the latest Delphi.

Audience Question

Q: I’ve used RTTI to design a flexible “security” system for applications– give administrators the ability to hide menu items, buttons, controls. Very useful for that.

A: :-)

Audience Question

Q: So essentially, it should be possible to create/add properties on-the-fly to classes/records based on scripts? this would be so powerful!

A: Not in the traditional sense. You would still need to manage the data, the object wouldn’t.

Audience Question

Q: field rtti for records was in 2010, for record methods came with like XE2 or later, rtti for record properties unfortunately still missing afaik :(

A: Good to know, thanks.

Audience Question

Q: Great Job Ray.

A: :-)

Audience Question

Q: If the application I am working on, should I care at all about RTTI?

A: Depends on what you are doing. Delphi uses for the designer.

Audience Question

Q: If you really need properties to be called from a script, then you should take a look at any of the Delphi Scripting engines: DWScript, TMS ScriptEngine, etc….

A: :-)

Audience Question

Q: Is there a list of projects in

A: Please send me an email and I can provide:

Audience Question

Q: Could you give the download link for the source code of your Effectively Using Generics in Object Pascal session again?


Audience Question

Q: Links for source code?

A: You can email Ray

Audience Question

Q: Links for source code?



via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Delphi, Delphi XE7, Development, Software Development

by jpluimers at October 30, 2014 08:05 PM



CodeRage 9 Files!

This year I presented Push notifications with Android. Here are the files mentioned in the session!


Android Push Notifications

Want to send push notifications to your clients or employees? This session goes over setting up GCM, installing push notifications into your application, and calling GCM to push those messages to your app.

Level: Intermediate
Jeff Lefebvre


Audience Question

  • Q: Are you going to release the videos on youtube? I would recommend it if you weren’t. Youtube has become the place where people search for training.
  • A: As for previous CodeRage events, CodeRage 9 replays will be available within 1-2 weeks after the conference concludees on the CodeRage website at

Audience Question

Audience Question

  • Q: Ummm DailyDeveloper – eh? Sory about that!
  • A: :-)

Audience Question

  • Q: CodeRage is also an anagram for CodeGear
  • A: I didn’t know that. Nice.

Audience Question

Audience Question

  • Q: On my Android SDK Manager I didn’t see anything of Google and some other options shown in your demo y\under Extras. Am the installation too old?
  • A: If you run the update once and then restart again it should offer you more options.

Audience Question

  • Q: great presentation! thanks
  • A: Yeah, I really enjoyed it too!

Audience Question

Audience Question

  • Q: Is it possible to show the last slide with links ?
  • A: There you go.

Audience Question

  • Q: Are there any limitations in terms of how many notifications can be sent, commercial use, etc?
  • A: AFAIK there is no limit.

Audience Question

  • Q: Why there are no build in componnets in Delphi for push notifications for iOS and Android?
  • A: There are push notification components in XE7

Audience Question

Audience Question

  • Q: What is a diffrence beetwen push notification from XE7 and GCM ?
  • A: The XE7 push notifications go through Kinvey, Parse or App42 BaaS providers and still use GCM, but abstracts out the complexity.

Audience Question

Audience Question

  • Q: Seems like push notifications could be a way to register historic places, like cots where people lived 150 years ago before emigrating to US in order to put them on historic maps whee the places today has other names
  • A: Sure

Audience Question

  • Q: Would be for research where places was, like finding leftovers in terrain and want to register that in a database together with name of place
  • A: If you wanted to.

Audience Question

  • Q: thanks jeff
  • A: no problem :)

was a pleasure! Now back to work lol

Audience Question

  • Q: What do I get if I renew maintenance?
  • A: You get another year of updates. Not sure about Rapid SQL, but you should get most of the other stuff. Talk to sales and they can give you the details.

Audience Question

  • Q: If people have a stair around they should probably go some trips up and down to increase blood circulation in legs :-D I’ll do that now :-D
  • A: Blood circulation is a good thing, I’d agree with you there.

Audience Question

  • Q: Was that a TLikable class?
  • A: Absolutely.

Audience Question

  • Q: Is Jim McK a codemonkey
  • A: Yes, I am a Code Monkey. ;-)

Audience Question

  • Q: I would advise those who like the Rapid SQL to upgrade to DBPower studio
  • A: Nice.



Filed under: Android, Android, Appmethod, Delphi, Delphi XE7, Development, Mobile Development, Power User, Software Development Tagged: android, Push notifications

by jpluimers at October 30, 2014 06:47 PM



Understanding Distributed Version Control

This session helps developers who have been working with a Centralized Version Control System such as SVN to understand and use Distributed Version Control such as GIT or Mercurial. This session focuses primarily on GIT, but applies to Mercurial. We also cover how to use GIT from the RAD Studio IDE.

Level: Beginning
Robert Love – State of Utah


Audience Question

  • Q: Can you say why you chose GIT over Mercurial?
  • A: Years ago I ran across a great blog post comparing both, as I had a hard time picking one. Ultimately I had to use GIT first on an Open Source project and got used to it, so I use it primarlly. I still have a few things I use that are with Hg. Overall one is not better than the other.
  • Q: Note the / is actually the slash, not the reverse slash (the \ is the back-slash, not a reverse slash either).
  • A: Thanks :-)
  • Q: Any way to speed up the refresh rate of GoToWebinar? A lot of what Robert Love shows can’t be seen as the webinar doesn’t keep up.
  • A: I can’t see a way to do this – Robert Love
  • Q: On my side, the GoToWebinar viewer refreshes like every 5-10 seconds, and I’m on a symmetric 50/50 megabit fiber connection.
  • A: Sometimes GoToWebinar gets slow, especially this time of the day. Sorry.

Audience Question and

Audience Question

  • Q: In SVN there is a revision number, is there something simular in git? We commonly put the SVN revision number in the version information on our executables, is there something simular one can do using git to identify what revision the program was built from?
  • A: Git has a hash number that tells you the revision, but it isn’t an incremting number.
  • Q: I favour Github over BitBucket especially for repositories containing documentation as GitHub allows you to have Markdown files referring relative locations to images and other URLs without getting broken. BitBucket has struggled for years to support that and still doesn’t.
  • A: :-)
  • Q: Since Github only supports Git (few hosters support Mercurial), that basically forced me to the Git side of DVCS.
  • A: :-)

Audience Question

  • Q: Git has also a far easier way of importing SVN than Mercurial: Git has it built in.
  • A: :-)

Audience Question

  • Q: The Distributed (briefcase) model works for Open Source projects, because noone is being paid any money. Example: One published Request is picked up by 10 developers, and when they all commit their Versions, usually only one is used, and the other nine’s work is completely/laregly wasted. So … I guess I don’t find this distributed model very compelling.Great Presentation though
  • A: If isn’t compelling, don’t use it. Git also has much better support for branching, merging, etc.

Audience Question

Audience Question

  • Q: is it possible RAD will support TFS?
  • A: I think I saw a plug in for that.

Audience Question

Audience Question

  • Q: Most of the demos I’ve seen have tidy demos involving text files, where merging seems relatively easy, as it would be with a .pas file – how do you find merging DFM files? (Which I’ve occasionally found tricky in SVN) Does Git/HNG make this easier?
  • A: Nothing handles DFM well if someone is changing the same area of the file. Git does pretty well if the changes are in different parts of the DFM.
  • Q: BitBucket has the huge advantage of freely hosting private repositories. On GitHub you need to pay for that.
  • A: Yes

Q: DVCS know about the changes to a file (and have the whole change tree locally) so are far better at merging van a state based system like SVN (though SVN has gotten better over the years)

Audience Question

  • Q: Version Control under Tools>Options is only available in XE7?
  • A: SVN has been there for a while, but Git is XE7

Audience Question

  • Q: I use SVN, and can see some nice things about SourceTree vs SVN. Did I miss why GIT might be better than SVN?
  • A: There are a lot of differences and advantages to Git.

Audience Question

  • Q: I work on sparetime with an ideal organisation that has its own server and today we have a svn repository. Seems like with git you miust o\upload souircecode to open soiurce repositories. I wonder is it possible to set up our own git server for own use?
  • A: Yes, absolutely. You can host your own private server or a private repository on other servers.
  • Q: Version numbers should not depend on the kind of repository one uses. It makes you technically dependant on the repository. So version numbers should come from your build integration.
  • A: :-)
  • Q: Git and Mercurial are great for working while not always being on-line.
  • A: :-)

Audience Question

  • Q: Duplicate work isn’t a function of the source control. Manage that through a bug tracking system.
  • A: :-)

Audience Question

  • Q: SourceConnexion not available for XE6 or XE7.
  • A: Send them an email and ask them to update.

Audience Question

  • Q: DVCS know about the changes to a file (and have the whole change tree locally) so are far better at merging van a state based system like SVN (though SVN has gotten better over the years)
  • A: :-)

Audience Question

  • Q: I’ve missed the Bluetooth as well as this current session – will it be available for download ?
  • A: Yes, 1 – 2 week.s
  • Q: The whole trick with any version control mechanism is to split work in such a way that you make the merges to be in disparate pieces of your code base (even when in the same file). Even though Git and Mercurial are far better at merging than for instance SVS, SVN and TFS, each merge is a risk.
  • A: Sure

Audience Question

  • Q: re: SourceConneXion – we have a license for it and tried to use it, but it’s not even close to what we need. No any support for XE6&7
  • A: Sorry.

Audience Question

  • Q: For info, there is also Gitlab ( if you want to host your own repositories. Fairly good and fairly feature rich
  • A: Thanks.

  • Q: Thanks for the great session. Well paced and well explained.
  • A: Your Welcome

Audience Question

  • Q: Do you have a tip for us how to treat common folders shared among projects?
  • A: GIT has a feature called SubModules that can do this.

Audience Question

  • Q: where does the name ‘CodeRage’ come from?
  • A: I believe “Rage” is to party or other excitement. So CodeRage is a Code Party or Code Excitement


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, BitBucket, CVS, Delphi, Delphi XE6, Delphi XE7, Development, DVCS - Distributed Version Control, git, GitHub, Mercurial/Hg, Software Development, Source Code Management, SourceTree, Subversion/SVN, TFS (Team Foundation System)

by jpluimers at October 30, 2014 06:19 PM



Bluetooth Classic and LE Programming with VCL and FMX

Level: Intermediate
Diego Navarro – Embarcadero


Audience Question

Audience Question

  • Q: can you please paste links int the chat window
  • A: Which link? I don’t have them in text if they are from the video, so I am just typing them in.

Audience Question

Audience Question

Audience Question

  • Q: On PC’s there is a CAMERA ICON on the upper right. of the Webinar window. I just snapshot the interesting pages and follow links later.
  • A: Good tip David!

Audience Question

Audience Question

Audience Question

Audience Question

  • Q: There is currently no common Bluetooth low energy Application Program Interface (API) for Android devices available
  • A: TBluetoothLE

Audience Question

Audience Question

  • Q: The sensor tag use BLE that is implemented in BT4.0. To work with Android you need Android with BT4.0 and OS 4.3+ (older version of Android doesn’t support BT 4.0)
  • A: Correct. :-)

Audience Question

  • Q: Can the Sensor tag be used with Android?
  • A: Yes, of course

Audience Question

  • Q: What is the accuracy of the gyroscopic sensor of SensorTag?
  • A: It’s really nice, the same chip is used in a lot of other devices, it’s not just a toy :)

Audience Question

  • Q: There is currently no common Bluetooth low energy Application Program Interface (API) for Android devices available
  • A: Yes, there is, since Android 4.3

Audience Question

  • Q: How can we find “custom” services from a Arduino Bluetooth LE Shield ? My app find the device but no services
  • A: It depends if the device is advertising the services.

Audience Question

  • Q: Got that now — apparentyl my Nexus 7 (2013) has it — so I’m OK
  • A: Good.

Audience Question

  • Q: Got that now — apparentyl my Nexus 7 (2013) has it — so I’m OK
  • A: yep, you Nexus 7 is fine for Bluetooth

Audience Question

  • Q: Can last connected device data be stored and be restored when app reboot?
  • A: it’s not useful, you can start doing a new startDiscover to get the devices around.

Audience Question

  • Q: Can I send binary data trough bluetooth?
  • A: Yes, right, you can, but Bluetooth LE is not intended for that, the bandwidth is so small, around 1 kB/s (LE)

Audience Question

  • Q: Can you provide a link where we could download the source code of your demo?
  • A: Diego will provide a download link for the sensor tag. You can find the rest with the samples folder.

Audience Question

  • Q: Working on Android with TBluetoothLE component i noticed that subscribe characteristic work only with the device/sensor that support notification property and not indication property. It is possible? Is something that will be available on update1? Thanks
  • A: That should be working.

Audience Question

Audience Question

  • Q: Do you know if the BLE component works with BT devices implemented Mesh technology?
  • A: Need to check. Unsure.

Audience Question

  • Q: How can we get the UUID of the device found?
  • A: Not recommend. Look for devices that implement the service you need.

Audience Question

  • Q: DavidI, where can I see your awesome video,”codemonkey”? I want to see it again. It’s parsonal question..
  • A: This is Jim. I’ll try to find an opportunity to show it again today. It isn’t available anywhere but here yet.

Audience Question

  • Q: Mesh technology is kind of distributed network of BT devices that connect each other to spread the BT messages to devices that can be out of range.
  • A: It should work.

Audience Question

Audience Question

  • Q: One hint: don’t forget to add “bluetooth” to the uses permissions on android.
  • A: Good tip.

Audience Question

  • Q: Can we find or uses non advertised “custom” services?
  • A: You need to know about the UUID and sservices and then you can connect and use them.

Audience Question

Audience Question

  • Q: Will order a sensor and give this a try $25 — spent more on lunch most days. :-) Digikey, Newark and Mouser carry them if you need some help finding one. Also the TI store.
  • A: :-)

Audience Question

  • Q: The radio rate is 2Mb/sec. I suspect mesh is limited or impractical. The spec doc should make it more clear. Only 354 pages — happy reading. Link above.
  • A: :-)

Audience Question

  • Q: Diego Navarro blog address?
  • A: Stay tuned to and I will make sure and link to his post when it is available.

Audience Question

  • Q: In proprietary mode, the CC2541 radio supports data rates up to 2 Mbps, and has extensive baseband automation, including auto-acknowledgment and address decoding. The RF Core controls the analog radio module and the RF transceiver state. In addition, it provides an interface between the MCU and the radio which makes it possible to issue commands, read status, and automate and sequence radio events. It has 1 KB of dedicated RAM, which holds the 128-byte transmit and receive FIFO. This chapter describes the proprietary mode operation of the CC2541 devices and features in the LLE program. For Bluetooth low energy operation, see Chapter 24.
  • A: Thanks!

Audience Question

  • Q: this just gets better and better every time I see it
  • A: Thanks!

Audience Question

  • Q: Great presentation! especially the TI sensor implementation .
  • A: Yes, I agree.

Audience Question

  • Q: DavidI, I am sad that I can’t find the page of “;. It causes 404 error.
  • A: Yes, it isn’t available yet. I’ll have the video online soon. For now it is just for CodeRage attendees. BTW, this is Jim McKeeth. ;-)

Audience Question

  • Q: We all have our pet projects in delphi. Here’s mine. Halloween light show with sound in my front yard controlled by delphi DMX Lighting system platform I created.
  • A: Nice

Audience Question


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Delphi, Delphi XE7, Development, Software Development

by jpluimers at October 30, 2014 04:55 PM



InterBase Keynote

If you need to manage distributed data over multiple locations then don’t miss the product address for InterBase! The next generation of InterBase is coming soon and will be super charged with a powerful new change tracking engine that makes managing distributed datasets a whole load easier!

Level: All
Stephen Ball – Embarcadero


Audience Question

  • Q: Off topic: Has their been any reports of issues with Yosemite and virtual machines (VMWare)? I am planning on updating my OS X this weekend.
  • A: I know Parallels has released an update to work with Yosemite. It is pretty common that you need a new version to support a new OS. I’d check with VMWare to see if they have an update or what they recommend. I haven’t updated yet because I’ve been so busy with CodeRage and everything, but plan to upgrade both Parallels and OS X next week.

Audience Question

  • Q: just changed
  • A: Sorry.

Audience Question

  • Q: Paralles 9 still works on Yosemite. However, 10 is supposed to work more efficiently.
  • A: Good to know.

Audience Question

  • Q: I’m using Parallels along with Yosemite and Windows 10 without any problems!
  • A: Nice.

Audience Question

  • Q: No problem. Looks like he was on the first slide whole time.
  • A: There was an intermediate slide but the screen was hung. My falt. Sorry.

Audience Question

  • Q: Parallels 9 have issues with Windows 10 and Yosemite. You must upgrade to Parallels 10.
  • A: Good to know.

Audience Question

  • Q: if i need to database 1 million news stories aday and proive a search functionality on headlines and story bodies where you can do word seach or phrase search for over 100 people, is interbase a good solution or is a noSQL better?
  • A: InterBase gives you User Defined Functions for searching. So there are ways to add search. There are other advantages too.

Audience Question

  • Q: does IB support #memory tables as in SQL ?
  • A: Not Memtables, but you can use FireDAC and InterBase supports Temporary Tables. So it depeds on your use case.

Audience Question

  • Q: meant caching tables within the engines
  • A: The caching algorythems optimize to use the memory you provide the database to keep the tables in memory.

Audience Question

  • Q: Excellent!! never looked at IB seriously, will join th BETA. thanks for the great presentation
  • A: :-)

Audience Question

  • Q: I have sampled audio/Seismic streams and stored on IB — several hundred and several thousand samples per second for 24 hours — that’s several GByte per day. A decent Linux server lets this work fine.
  • A: :-)

Audience Question

  • Q: perfect – looking forward to the Beta
  • A: :-)

Audience Question

Audience Question

  • Q: btw someone know any map to “translate” mac keyboard to windows i toke me 1 hour to find backslash
  • A: Some of the Virtual Machine software suppors that. Beyond that I am not sure.

Audience Question

  • Q: The barcode really does work if your tablet is handy. Only caught the second one though. It was the first one I wanted. Oh well — waiting for the replay!
  • A: We will ahve the replays in a week or two. You’ll get an email.

Audience Question


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Database Development, Delphi, Delphi XE7, Development, InterBase, Software Development Tagged: InterBase

by jpluimers at October 30, 2014 04:30 PM



Working with PDF and Office Documents using VCL and FireMonkey

In this session, we take a deep look into the all-new multi-format document processing toolset for Delphi from Gnostice. We take a brief look at architectural details of the product and then go into using the product. You’ll get to see real code examples for viewing, printing, converting and processing documents in Delphi VCL and FireMonkey on Desktop and mobiles devices. You’ll also see examples of document processing using the new Gnostice REST-based document server.

Level: All
Girish Patil – Gnostice


Audience Question

  • Q: i wish there was a C++ to Delphi converter at least for porting code. So when I get a API sample from someone that’s in C++ i could just convert it to delphi and tweek it from there.
  • A: It would be nice.

Audience Question

  • Q: WIll this work as a document viewer for iOS and Android apps?
  • A: Yes, the native viewer for iOS will, but not yet for Android.

Audience Question

  • Q: How do you recommend controlling duplex and tray selection when printing several documents in one batch?
  • A: Currently not possible, unless you use the printer object.

Audience Question

  • Q: Is Android support in the works?
  • A: yes

Audience Question

  • Q: those it compress the final result PDF? can we teak it ?
  • A: there is compression. Working on improving it.

Audience Question

  • Q: If systools is needed for xe7 but isn’t in sourceforge, it only required creating a xe7 package. The source is compatible
  • A: nice

Audience Question

  • Q: If I wanted to create an app on the Mac, using FireMonkey, what would be the correct choice on the Website? ie: would “XtremeDevSystem Delphi Subscription 8″ be the correct choice?
  • A: That would be a good choice, but the XtremeDocumentStudio would do too

Audience Question

  • Q: It would be nice to have a LITE pdf viewer for firemonkey, that could read from files or streams.
  • A: There is a view, print and convert edition as well that you could look into.

Audience Question

  • Q: Can PDF’s be saved in PDF/A format?
  • A: Something in the works right now. Expect it early 2015

Audience Question

  • Q: Will it be compatible with C++Builder any time soon?
  • A: It is now.

Audience Question

  • Q: how about excel documents
  • A: Currently supporting the wordprosseing formations. Spreadsheets are coming next year.

Audience Question

  • Q: For sensitive data, you show phone and email, can you remove sensitive pages from documents such as Financial info pages from a document.
  • A: You would need to use two functions: Search to find the information and then delete page on that page.

Audience Question

  • Q: Is Signing and Verification supported?
  • A: Signing is supported. Verification is not. Signing requires the PDF toolkit project.

Audience Question

  • Q: Is there any plans for a document composer or editor?
  • A: Yes, that is planned. Plan to cover everything related to documents.

Audience Question

  • Q: does your viewer have the ability to touch or click contained words for event processing. ie. click a contained drawing number and lookup a database entry
  • A: There are mouse events that tell you where the click was in reference to the page, but doesn’t report what was clicked on. Full interactivity in the viewer is planned. Form filling and annotation support is coming.

Audience Question

  • Q: XE7 update1 is comming soon right? If so, does installing the update require reregister the product ?
  • A: You need a valid license and to be a registered user to install Update 1 when it is available.

Audience Question

  • Q: I am, just want to know if that require reregistering or not
  • A: Oh, does not require re-registering. I didn’t catch that the first time. Installing the update does not increment your registration count. If you do exceed your registratiosn though, you can submit for a registration limit increase.

Audience Question

  • Q: thanks
  • A: Sure.

Audience Question

  • Q: TurboPower Async pro Fax components where not upgraded :(
  • A: OK.


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Delphi, Delphi XE7, Development, Software Development

by jpluimers at October 30, 2014 03:12 PM



NestedDataSets in ClientDataSets

A column of a ClientDataSet can contain a dataset, a tabular structure containing one or more columns and zero or more records. This presentation continues Cary Jensen’s CodeRage series on ClientDataSets by looking at this power field type.

Level: All
Cary Jensen – Jensen Data Systems, Inc.


Audience Question

  • Q: Would nested datasets akso be usable for defining new, lacking records in different tables
  • A: Yes. In the presentation I demonstrate creating nested dataset structures where no underlying database already exists

Audience Question

  • Q: Would nested datasets be something similar to a view made from lot of tables with ‘from table1 left join t on (table2.key=table1.key) left join …………
  • A: No. That would create a single table with values from two tables. A nested dataset is a dataset nested within a field of another dataset. With nested datasets you actually have two or more different tables

Audience Question

  • Q: Is there an easy way to exncrypt the data in a file that was written out using clientdataset or FDMemTable to for instance XML or JSON type file? Would one need to stream it and then encrypt/decrypt the stream upon writing/reading?
  • A: You got it right in you suggestion. To encrypt, you write from the CDS or FDMemTable to a stream, encrypt the stream, and then write that stream. You do the same in reverse to load the encrypted data

Audience Question

  • Q: ClientDataSet can be connected to 3rd party datasets using the provider component.Is FDMemtable limited to Firedac datasets ?
  • A: FDMemTables are currently designed for FireDAC datasets

Audience Question

  • Q: If I have a many to many relationship using an intersection table in between (Table A 1-n Table AB n-1 Table B). How do I write this out using the nested datasets?
  • A: To a file, call SaveToFile on the top-level CDS

Audience Question

  • Q: How am I going to get you to sign your new book !!! Having got you to sign your back back in London Delphi Deve Days !! LOL
  • A: We’ll just have to get you back to a Delphi Developer Days :)

Audience Question

  • Q: Nice presentation Carry
  • A: Thank you

Audience Question

Audience Question

  • Q: You show both the MidLevelCDS and the ThirdLevelCDS owned by the TopLevelCDS. Would/should the ThirdLevelCDS be owned by the MidLevelCDS instead?
  • A: The ownership is a detail, and has no effect on the master-detail linkage

Audience Question

  • Q: Audio: Still some artifacts, but clearer than it was
  • A: :-)

Audience Question

  • Q: I am routinely impressed with Cary’s knowledge and communication skills. Both contribute to my enthusiasm for Object Pascal! THANKS
  • A: :-)

Audience Question

  • Q: Great Presentation! I used this technique in a moblie application. It takes a little longer to load, initially, but once the data is loaded, no more round trips are required – which makes the app MUCH more robust.
  • A: :-)

Audience Question

  • Q: I was thinking about an a customer exists, but a certain order is lacking, could that lacking order record be inserted?
  • A: Not only can it be inserted into the detail table nested dataset, that record will be inserted by the TLD by a call to ApplyUpdates.

Audience Question

Audience Question

  • Q: An example on this compressing/encypting/saving and then loading/decrypting/uncompressing would be great.
  • A: Yes it would. Thanks.

Audience Question

  • Q: where do you find the latest version of the Turbo Power stuff
  • A: Source Forge

Audience Question

  • Q: Great Presentation! I used this technique in a moblie application. It takes a little longer to load, initially, but once the data is loaded, no more round trips are required – which makes the app MUCH more robust.
  • A:

Audience Question

  • Q: Is there a possibility in future that tclientdataset becames deprecated?
  • A: I doublt it, at least not anytime in the near future

Audience Question

  • Q: There are multiple flavors on SourceForge (…”New”)
  • A: Great.

More information on the special offers

Audience Question

Audience Question

  • Q: Confirmed – The link works
  • A: :-)

Audience Question

  • Q: Hope systools also would be part of the pacoage
  • A: That one might get some attention later. ;-)


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Delphi, Delphi XE7, Development, Software Development

by jpluimers at October 30, 2014 03:09 PM



ClientDataSets and FDMemTables Compared

ClientDataSets are in-memory tables that have been in RAD Studio since Delphi 3, but there’s a new kid in town, the FireDAC FDMemTable. This presentation, by ClientDataSet expert Cary Jensen, compares and contrasts these in-memory table classes, providing you with guidance on which to use and when.

Level: All
Cary Jensen – Jensen Data Systems, Inc.

The Q&A log:

Welcome to CodeRage 9!

  • Q: Thanks for organizing this. Hi from The Netherlands
  • A: Hello and thanks for joining us!

Audience Question

  • Q: yes a great thing, greetings from Germany too!
  • A: You are welcome. Thanks for being here.

Audience Question

  • Q: Ill agreewith Neterhlands and Germany its 3 tuff days for you but very useful for us developers of all levels , hello and thanks from Swesen
  • A: Thanks and you are welcome!

Audience Question

  • Q: Good morning, David
  • A: You get Jim today. David is in the C++ track.

Audience Question

  • Q: Hello, I missed Allen Bauer’s session yesterday. Any links for demos and contact details for him, if possible?
  • A: Replays will be available for CodeRage sessions that you may have missed within 1-2 weeks of the conference conclusion on the CodeRage website.

Audience Question

  • Q: From Spain. Thanks you very much. Hello, smart thinks !
  • A: :-D You are welcome! Thanks for being here.

Audience Question

  • Q: Hi, Jim
  • A: Hi Cary!

Audience Question

  • Q: Ready with bells on. :)
  • A: Nice.

Audience Question

  • Q: Morning Chaps :)
  • A: Good morning!

Audience Question

  • Q: Thx for reviving the XE7 trial key
  • A: Certainly.

Audience Question

  • Q: Good morning. I’m from Indonesia.
  • A: Morning!

More information on the special offers

The virtual exhibit hall

Use the 10% off discount code “THINGS”

Audience Question

  • Q: Can one inmemory object contain updates to several tables in one, or do I need to update one table at a time.
  • A: Use nested datasets to include more than one table. CDS and FDMemTable differ. I discuss this later

Audience Question

  • Q: Are the CDS andf FD XML file formats compatible?
  • A: Not really

Audience Question

  • Q: If I want to use either in different threads, do I need to implement my own locking/protection, or are there any features that make this same and easy?
  • A: You need to implement your own synchronization. If the threads are created after the dataset is created, and the dataset is treated read-only, there may be no problems

Audience Question

  • Q: Better wording -> If I want to use either dataset in different threads, do I need to implement my own locking/protection, or are there any features that make this safe and easy?
  • A: Same answer as above. We can talk about this in Q&A

Audience Question

Audience Question

  • Q: did the CDS developers ever fix the performance problem encountered when adding lots of rows?
  • A: I don’t think so

Audience Question

  • Q: Are there plans to add support for TDatasetProviders to FDMemTable? It means otherwise a complete re-write of the existing DataSnap stack…
  • A: No. FDMemTables will likley support different mechanisms. FireDACJSONReflect is one of those

Audience Question

  • Q: You know what would be cool? A book dedicated to FDMemTables.
  • A: Yes. I wonder who might write that :)

Audience Question

  • Q: Thanks. My main use of CDS at the moment is as self-contained data containers inside a mobile app (ios and Android) which can take data via Datasnap and store locally to a file when offline. Biggest dataset is say 5000 records which includes some memo fields. Do you think there would be noticeable performance improvements using FDMemTables? (Sorry, tough question I know). Some filtering currently takes 2-3 seconds for example.
  • A: FDMemTables are often demonstratable faster than ClientDataSets, so there might be a performance enhancement

Audience Question

  • Q: If updating a tclientdataset based app to FDMemtable based, can I during update have both datasets involved on server or client?
  • A: Yes

Audience Question

  • Q: I cannot understand what Jensen is saying! :(
  • A: :-( It is difficult.

Audience Question

  • Q: Your new book does it contain information on FDMemTable or is it just on ClientDataSets?
  • A: It is exclusively ClientDataSet, and will be the last edition of that book since FDMemTable is gaining more of the features from ClientDataSet. It brings it up to XE7.

Audience Question

  • Q: The previous book was not electronically available. Will the new version be available in ebook format ex. through Amazon Kindle?
  • A: It will be Kindle

Audience Question

  • Q: I have very large applications using DataSnap and ClientDataSets in a Multi-Tier structure. Is It viable to change this structure to use FDMemTable?
  • A: It is, but wait for FDMemTable to expand.

Audience Question

  • Q: FDS binary output file size is 2x times larger than CDS binary output file size
  • A: thx

Audience Question

  • Q: I think you said you currently can’t move data from a CDS into a FDMem, is that right?
  • A: Not via the XML data property, or the XML file. You would need to read and pump the individual records. Maybe use the FD Batch move. They are different internally.

Audience Question

Audience Question

  • Q: How it’s working refrshing data on client side when using FDMemTable ? You show geting all DataSet and Aplying Updates but what with refreshing ? I need to get all DataSet again ?
  • A: You should be able to refresh the current record. Not sure. There are a lot of similarities between the two.

Audience Question

  • Q: Can we get discount on the new book .. if we bought the previous version :)
  • A: That isn’t possible through Amazon. The book will be reasonable priced.

Audience Question

Audience Question

  • Q: Really liked the first edition and refer to it a lot so looking forward to buying print and electronic copies of 2nd
  • A: :-D

Audience Question

  • Q: When making the video from this speech, is it possible to remaster the Q&A part by reanswering the questions so it is possible to understand what is said? (If Cary understand what he said)
  • A: We will

Audience Question

  • Q: DDD is great!
  • A: Thanks!

Audience Question

  • Q: I’ve been looking for a good solution to store complex configuration data specific to the working of the application. I’ve looked at XML files, JSON files, Client Datasets , IB2Go and would also now consider the FDMem tables. Can you suggest anyone over the others?
  • A: Using ClientDataSet or FDMemTable with nested datasets is a nice solution. FDMemTable supports JSON, which is more concise than XML


via: CodeRage 9 – Object Pascal Sessions.

Filed under: Appmethod, Delphi, Delphi XE7, Development, Software Development

by jpluimers at October 30, 2014 01:00 PM