The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Delphi XE4’ Category

2D transformations as answer to “delphi – Change orientation of a shape” – Stack Overflow

Posted by jpluimers on 2013/07/09

Sometimes a generic answer to a specific answer gives people a lot more insight into what they actually want to accomplish than a specific answer.

Plus that the knowledge does not only apply to VCL in any Delphi version: it works in any development environment where you can draw.

That’s why I like this 2D transformation answer so much: Read the rest of this entry »

Posted in 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 x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | Leave a Comment »

Some great Delphi XE4 iOS push notification demos by Luis Felipe González Torres done in English by Anders Ohlsson

Posted by jpluimers on 2013/06/20

On the blog from Embarcadero MVP Luis Felipe González Torres are some great Delphi XE4 iOS demos.

However, the blog is Spanish (that’s probably why he is not on DelphiFeeds), so if you do not understand that you had to live with the Google Translate versions of the pages.

Until CodeRage Mobile that is: Anders Ohlsson gave a English presentation:

Creating Apple Push Notification Services (APNS) for your Mobile Applications

iOS supports the Apple Push Notification Services (APNS) This session will show you how to create a push notification services as part of your mobile application. APNS is service for sending information to iOS and OSX devices. This session will show you how to create server and device applications that create notifications containing the device token and JSON payload property list.

via CodeRage Mobile – Conference Sessions.

Basically he covered these Spanish blog posts where you can download the source code (Google translation in parenthesis):

  1. Delphi XE4 iOS. Adicionando soporte a Notificaciones Remotas (Video y Código Fuente) |.
    (Delphi XE4 iOS. Adding support for Notifications Remote (Video and Source) |)
  2. Delphi XE4 iOS. Flexibilizando el Soporte a Push Notification. Solucíon mas elegante! |.
    (Delphi XE4 iOS. Easing the Push Notification Support. More elegant solution! |)
  3. Delphi iOS XE4. Apple Push Notification. Capturando la notificación cuando la aplicación no se está ejecutando. |.
    (XE4 iOS Delphi. Apple Push Notification. Capturing the notification when the application is not running. |)
  4. Delphi iOS XE4. Apple Push. Configuración del Ambiente (Muy importante) |.
    (XE4 iOS Delphi. Apple Push. Environment Settings (important) |)

Important things:

–jeroen

Posted in Delphi, Delphi XE4, Development, FireMonkey, iOS, Software Development | Leave a Comment »

CodeRage Mobile day 2 QA

Posted by jpluimers on 2013/06/19

I had a bit of trouble getting into CodeRage Mobile: somehow the confirmation email never reached the pluimers.com servers. After retrying today, @EmbarcaderoTech sent a GotoMeeting link that worked.

Later I will try to trace back about the mail issue (:

I’m in now, and since I usually loose the QA information, here is a dump of the QA for today so far.

Will try to find time for post editing and getting the URLs clickable.

Welcome to CodeRage Mobile! Read the rest of this entry »

Posted in Barcode, Delphi, Delphi XE4, Development, FireMonkey, JavaScript/ECMAScript, jQuery, OS X FMX, Scripting, Software Development | Leave a Comment »

Vintage Dave is working on a new multithreaded memory manager for Delphi that does not have a global lock

Posted by jpluimers on 2013/06/19

The comment thread at via [WayBack] The Oracle at Delphi » Give in to the ARC side (now at [WayBackplace 1 and [WayBack] 2) is very interesting.

So soon after writing a StackOverflow [WayBackanswer on Delphi Memory Managers yesterday, [WayBack] this one by [WayBack] David M (aka vintagedave) caught my eye:

This is unannounced at the moment, but I am working on a new memory manager which does not have a global lock, and is designed for multithreaded usage, including cases where memory is allocated in one thread and freed in another, and many threads are allocating and freeing at once. It also uses a more secure design than FastMM4, which may be important for world-facing code, eg web servers. It’s a personal project which I have not yet announced, but if you are interested (Allen, Guenther, others) please feel free to contact me at vintagedave@gmail.com.

I wonder if it is better than the multithreaded Delphi memory managers I mentioned in the answer:

As a side note:

One of the reasons for using FastMM is the excellent debugging capabilities. It looks like – though not free – DDDebug extends this a lot!

I found it in Wanted: live leak detection for FastMM – DelphiFeeds.com and [WayBackTURBU Tech » Blog Archive » Wanted: live leak detection for FastMM.

–jeroen

via The Oracle at Delphi » Give in to the ARC side.

Posted in Delphi, Delphi XE4, Development, FastMM, Software Development | Tagged: , , , , | 9 Comments »

Delphi XE4 Update 1 is out (via: Installing the Platform Assistant on a Mac – RAD Studio)

Posted by jpluimers on 2013/06/12

Over the last couple of days, I was asking myself

“wow, the docwiki has been updated for the Delphi XE4 update 1 version of the Mac edition of the Platform Assistant, how long until the official update is out?”

These URLs from Installing the Platform Assistant on a Mac – RAD Studio didn’t work for a couple of days:

Now they do!

The reason is that yesterday Embarcadero released 29446 Update 1 for Delphi, C++Builder and RAD Studio XE4 that fixes lots of stuff: Fix list for Update 1 for RAD Studio XE4, Delphi XE4 and C++Builder XE4.

Note it is not referring to Readme – Help Update 1 for Delphi and C++Builder XE4 – RAD Studio which got released last week as 29436 Help Update 1 for Delphi, C++Builder and RAD Studio XE4. It is the real Delphi XE4 Update 1.

The cool thing: finally it is a binary patch. Not fast about as fast as a full uninstall/reinstall), but at 336 megabytes a much smaller download than the 3.7 gigabytes of 29451 Delphi XE4 and C++Builder XE4 ISO (including Update 1).

Patched update versus full uninstall/install is a trade off:

  • Patch can take a couple of hours, and is CPU bound (too bad most of it is bound to a single CPU core)
  • Uninstall/reinstall is disk-speed and disk-size bound (make sure you have 15+ gigabytes free; an SSD improves this process a lot)

altd, ftpd, keeping off-line downloads Read the rest of this entry »

Posted in Delphi, Delphi XE4, Development, Software Development | Tagged: , | 2 Comments »

Delphi XE4: installer batch file for “experimental GExperts + code formatter for Delphi XE4”

Posted by jpluimers on 2013/06/12

Slightly more than a month ago, Thomas Müller release the experimental GExperts + code formatter for Delphi XE4.

Since there is no official GExperts for Delphi XE4 build yet, his installation instructions include this:

Use the ExpertManager tool to register GExperts to Delphi XE4.

The thing is: ExpertManager is part of GExperts, so this introduces a “chichen-and-egg” situation.

So I wrote a small batch file and a bit of documentation to install it.

Just in case you cannot download that SVN changeset easily, here are the documentation and batch-file:

Documentation

Steps to install:
0- Quit Delphi XE4
1- Download the GExperts XE4 experimental from http://blog.dummzeuch.de/2013/04/28/experimental-gexperts-code-formatter-for-delphi-xe4/
2- Recursively unpack that download
3- Copy the batch file Install-GExperts-XE4-experimental–run-as-administrator-from-ExpertManager.exe-directory.bat into that directory
4- From that directory, run the copied Install-GExperts-XE4-experimental–run-as-administrator-from-ExpertManager.exe-directory.bat
5- Run Delphi XE4
6- Check if GExperts is installed

Batch file

:: check if user is administrator

  "C:\Windows\system32\cacls.exe" "C:\Windows\system32\config\system" 1>nul 2>&1  && (goto :isAdmin)
:isNoAdmin
  echo you need to be Administrator, and (when under Vista or higher) run this using using UAC
  goto :exit

:isAdmin

:: Gets the right link for x86 (32-bit) program files
IF /I %PROCESSOR_ARCHITECTURE% == amd64 goto :x64
IF /I %PROCESSOR_ARCHITEW6432% == amd64 goto :x64
goto :x86
:x64
   :: OS is 64bit
   set ProgramFilesX86=%ProgramFiles(x86)%
  goto :continue
:x86
   :: OS is 32bit
  set ProgramFilesX86=%ProgramFiles%
  goto :continue

:continue

:: create the right directory and copy the files

  setlocal

  set TargetDirectory=%ProgramFilesX86%\GExperts for RAD Studio XE4

  mkdir "%TargetDirectory%"
::  set FilesToCopy=DbugIntf.pas ExpertManager.exe GExperts.chm GExpertsDebugWindow.exe GExpertsGrep.exe regularexpert\GExpertsRSXE4.dll Readme.txt preview.pas
  set FilesToCopy=ExpertManager.exe GExperts.chm regularexpert\GExpertsRSXE4.dll preview.pas

  for %%f in (%FilesToCopy%) do copy /y %%f "%TargetDirectory%\"
  set RegFile="%TargetDirectory%\ExpertsXE4.reg"
::  explorer /select,"%TargetDirectory%\GExpertsRSXE4.dll"

:: expand backslash into double backslash for .REG file
  set ExpertTarget="%TargetDirectory%\GExpertsRSXE4.dll"
  set ExpertTarget=%ExpertTarget:\=\\%

::Windows Registry Editor Version 5.00
::
::[HKEY_CURRENT_USER\Software\Embarcadero\BDS\11.0\Experts]
::"GExperts"="C:\\Program Files (x86)\\GExperts for RAD Studio XE4\\GExpertsRSXE4.dll"
::
  echo Windows Registry Editor Version 5.00 >%RegFile%
  echo. >>%RegFile%
  echo [HKEY_CURRENT_USER\Software\Embarcadero\BDS\11.0\Experts] >>%RegFile%
  echo "GExperts"=%ExpertTarget% >>%RegFile%
  echo. >>%RegFile%
::  explorer /select,%RegFile%
  regedit /S %RegFile%

  endlocal

  goto :exit

:exit

–jeroen

via: experimental GExperts + code formatter for Delphi XE4 « twm’s blog.

Posted in Batch-Files, Delphi, Delphi XE4, Development, Scripting, Software Development | 2 Comments »

FMX is not a VCL replacement

Posted by jpluimers on 2013/05/01

This is more elaborate English version of a short Dutch message I recently sent to explain the differences between VCL and FMX:

Do not regard FMX as a replacement for VCL: they are different kinds of frameworks.

VCL is a wrapper around Windows Controls. In itself, it has not much functionality: it exposes the underlying Windows functionality. The exception are data aware controls that provide basic functionality for writing data aware applications. There is a huge 3rd party market for extending VCL support, for instance providing extra Windows functionality, enriching data aware behaviour (look at all those fancy data aware grids), and many more.

FMX  is the FireMonkey X-platform framework. Major functionalities are vector based 2D, 3D drawing and controls, and support for styles and composition.

When introducing FMX in Delphi XE2, Embarcadero also introduced a new way of data binding that is shared with FMX and VCL. FMX extends this a bit to some basic data aware controls.

Gone are most of the platform specific features like drag & drop, full blown Windows Shell ListViews, etc. There are some controls that manifests themselves differently on each supported platform (like Pickers), but most of that is currently left to the 3rd party FMX component market.

So if you want FMX to replace VCL, then be prepared for quite some shopping in the 3rd party market.

CLX tried to be a full blown cross platform VCL replacement, but that didn’t work very well.

–jeroen

Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Development, FireMonkey, OS X FMX, Software Development | Tagged: , , , , , , | 1 Comment »

Delphi: Thomas Mueller is fast – experimental GExperts + code formatter for Delphi XE4 « twm’s blog

Posted by jpluimers on 2013/04/28

Thomas Mueller is fast: experimental GExperts + code formatter for Delphi XE4 « twm’s blog.

–jeroen

Posted in Delphi, Delphi XE4, Development, Software Development | Leave a Comment »

Delphi – finding the VERxxx define for a particular Delphi version: use JEDI.INC

Posted by jpluimers on 2009/10/15

Edit 20140822 since originally posting, JEDI moved to a GIT repository, so I changed some URLs and added that it is up to date until Delphi XE7.

Finding the correct VERxxx conditional define for a particular Delphi version is asked by a lot of people.

Even the first link in the above search, does not contain the full list!
But: JCL comes to the rescue

The JCL file JEDI.INC usually (read: like 99.999% of the time) is up to that with that information soon.
Currently, it contains all the defines starting with Delphi 1, up to Delphi 2010 XE7.

You can always browse the to JEDI.INC with this link to the sourceforge trunk. link to the GitHub master version.

In fact that file contains a lot more useful defines.
Actually, having the JCL and/or JVCL at hand is a very good practice: it is filled with high quality code that solves a lot of everyday problems.

Note:

VER190 (by some people attributed to the wrong Delphi version) is only used by Delphi 2007 for .NET (Delphi 2007 for Win32 used VER185 by itself and shares VER180 with Delphi 2006 for Win32).

The number 13 (in between Delphi 2009 aka Delphi 12, and Delphi 2010 aka Delphi 14) was never used as a Delphi version number
Since Delphi is mainly developed in the USA, and since a lot people there have Triskaidekaphobia, they showed mercy to those and skipped Delphi 13.

–jeroen

Posted in 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 x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 9 Comments »