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’ Category

Deep Object Comparison Delphi – Stack Overflow

Posted by jpluimers on 2011/11/10

Last week there was an interesting question on Deep Object Comparison Delphi at Stack Overflow.

Two nice answers:

  1. Recursive new style RTTI based solution (comparing all data)
  2. Streaming using OmniXML and comparing the output (comparing only the relevant data)

–jeroen

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

Allocating 4Gb+ of memory in x64 using Delphi XE2 Update 2: Unofficial fix for QC#100726 …

Posted by jpluimers on 2011/11/09

If you are creating x64 applications using Delphi XE2, have Update 2 installed, and are (potentially) allocating more than 4Gb of memory (QC report 100726), then you need the Unofficial fix for QC#100726, or use the latest version of FastMM (see below).

If you use Delphi XE2 (original release) or Update 1, then you don’t have problems in this scenario.

Thanks to FastMM author Pierre le Riche for providing this fix so quickly.

Note that the latest 4.x release of FastMM is now FastMM 4.99 and contains the same fix.

–jeroen

Via: Embarcadero Discussion Forums: Unofficial fix for QC#100726 ….

Posted in Delphi, Development, Mobile Development, Software Development | 4 Comments »

EKON15 download materials on-line at bo.codeplex.com

Posted by jpluimers on 2011/11/03

I uploaded the EKON15 conference download materials to http://bo.codeplex.com.

The changeset you are after is http://bo.codeplex.com/SourceControl/changeset/changes/70872

It contains most of the materials for the Delphi Tage and the Delphi Live conferences too, though I will upload the missing pieces soon.

With the [WayBack] demise of codeplex, these links now have moved to

–jeroen

Posted in Conferences, Delphi, Development, EKON, Event | Leave a Comment »

You need at least 5Gb free space for Update 2 for #Delphi XE2, C++Builder XE2 and RAD Studio XE2

Posted by jpluimers on 2011/11/02

Yesterday, Update 2 for Delphi XE2 / C++ Builder XE2 / RAD Studio XE2 became available for download.

A few notes from my experience upgrading from a full RAD Studio XE2 Update 1 install (from ISO):

  • You need at least 5 Gb free disk space to install Update 2.
    The installer won’t warn you in advance: it will indicate it needs more disk space when it cannot update the first file that does not fit.
    In my case (VMware image of 40 Gb with 4 Gb free), that was not enough.
  • It will leave a 300 Mb directory at %temp%\radstudio_xe2_update2_download
  • Downloads are available from the altd http and ftpd ftp servers for registrered users at about 300 kilobyte per second each.
    Expect a total download time of at least:

    1. 15 minutes for the 300 Mb XE2 Update 2,
    2. 90 minutes for the complete 2.5 Gb XE2 install ISO that includes Update 2,
    3. 40 minutes for the 800 Mb XE2 Help Update 1,
    4. 20 minutes for the 350 Mb RADPHP XE2 Update 2.
  • The Update 2 install will wait a very long time in the “Validating” phase. Just be patient, it will get there in the end.
  • Though the  Help Update 1 is a lot bigger download, you usually only install one language and then it needs around half a gigabyte.

There are a ton of changes (154 changes files in the C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\source directory tree alone) including some of the things I came across that now have been fixed:

  1. warnings about duplicate resources when including MidasLib
  2. refreshing of BindingList
  3. when the FireMonkey designer is visible, Alt-key combinations now work again

–jeroen

Via: Update 2 for Delphi XE2, C++Builder XE2 and RAD Studio XE2 now available – DelphiFeeds.com.

Posted in Delphi, Delphi XE2, Development, Software Development | 8 Comments »

Delphi: solution for “How can I find all the units in my Delphi app?” (via Stack Overflow)

Posted by jpluimers on 2011/11/01

Delphi Tricks (from Chris Hesik, see link below) to show which units are compiled into an app:

  • Use the modules view, this will show you what units (and source files!) the debugger knows of for your modules.
  • Use the –depends switch on the commandline: this will output a .d file listing all the .dcus and .dcps for your modules.

–jeroen

Via: debugging – How can I find all the units in my Delphi app? – Stack Overflow.

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

Delphi XE2 Hands-On Workshop met better office – beperkt aantal plaatsen beschikbaar

Posted by jpluimers on 2011/10/25

Op dinsdag 6 en woensdag 7 december 2011, organiseren Barnsten en better office benelux een 2 daagse Delphi XE2 Workshop in Hoofddorp.

Het aantal plaatsen is beperkt, aanmelden kan via de Barnsten.com site.

Het doel van deze workshop is ervaren Delphi ontwikkelaars snel productief te laten werken met Delphi XE2. De workshop is modulair opgezet: inschrijving is per dag mogelijk.

De workshop sluit aan op de workshop die vorige week door Barnsten en The Delphi Company is georganiseerd: er zit nauwelijks overlap in de onderwerpen.

Samenvatting

Dag 1 heeft de focus op nieuwe features voor Windows gebruikers.

Dag 2 gaat compleet over cross platform FireMonkey (Windows, Mac en iOS: iPad/iPhone/iPod-touch). Neem hier je eigen

Voorbereiding

Nodig voor dag 1 en dag 2:

Nodig voor dag 2:

Programma

In samenwerking met better-office organiseert Barnsten een Hands-On workshop voor de gevorderde Delphi
ontwikkelaar. Het doel van deze workshop is u, als ervaren Delphi ontwikkelaar, snel productief te laten werken met
Delphi XE2. De workshop is modulair opgezet zodat u zich per dag kunt inschrijven.
De Hands-On Workshop vindt plaats op 7 en 8 december 2011 en wordt gehouden in Hoofddorp. Kijk voor de
beschrijving onder het kopje Product info en voor de dagindeling onder het kopje Specificaties.

Inhoud Dag 1: Introductie Delphi/RAD Studio XE2

  • Wat is nieuw in XE2
  • Migreren van oude projecten
  • Introductie x64: wat is nieuw, hoe zet je projecten over naar x64. Meer over de platformen en performance
  • VCL Styles: hoe werkt het, wat kun je er mee
  • Live Binding: wat zijn de voordelen / nadelen
  • Unit Scoping: voordelen / nadelen, backward compatibility
  • TZipFile ondersteuning
  • Conditional defines
  • FireMonkey: HD en 3D software ontwikkeling met FireMonkey
  • RAD Studio XE2 Roadmap
  • Installatie XE2 op Windows en Mac OS X

Dag 2: FireMonkey

  • Basis FireMonkey en de verschillen op de platformen Windows, OS X en iOS
  • FireMonkey op iOS: het gebruik van Xcode
  • Maken van een eenvoudige FireMonkey HD applicatie: basisprincipes, animations, effects
  • Maken van een eenvoudige FireMonkey 3D applicatie: basisprincipes, animations, effects en belichting
  • Beide applicaties van Windows naar Mac OS X omzetten
  • Debuggen op Mac OS X en iOS emulator
  • Gebruik van HD en 3D in 1 applicatie
  • Een iOS versie maken van beide applicaties
  • Fundamentele verschillen tussen mobile en desktop: hoe ga je daar in je UI mee om
  • XML, data en data binding in de FireMonkey applicaties: hoe maak je dit cross-platform
  • Hoe breng ik VCL applicaties naar FireMonkey
  • Windows: mixen van VCL en FireMonkey
  • Overzicht van interessante blogs, sites en artikelen

Installatie instructies

Installatie instructies op de Windows PC

  1. Installeer RAD Studio XE2 en de on-line help (gebruik overal de default instellingen)
  2. Installeer InterBase XE Developer edition

Installatie instructies op de Mac

Voor FireMonkey Mac OS X ontwikkeling

  1. Kopieer het bestand setup_paserver.zip naar je Mac. Deze staat meestal in (X: je Windows drive):
    64-bits systeem: X:\Program Files (x86)\Embarcadero\RAD Studio\9.0\PAServer
    32-bits systeem: X:\Program Files\Embarcadero\RAD Studio\9.0\PAServer
  2. Pak de file setup_paserver.zip uit op de Mac (je krijgt dan een bestand setup_paserver)
  3. Run de setup_paserver op de Mac.
  4. InterBase Developer edition:
    volg de algemene installatie instructies op de Embarcadero site,
    gevolgd door de specifieke Mac OS X instructies op de Embarcadero site.

Voor Apple iOS (iPad, iPhone, iPod touch) ontwikkeling

  1. Download en installeer Xcode 4 van de Apple site (je moet je eerst registreren) http://developer.apple.com/xcode/
  2. Kopieer de file FireMonkey-iOS.dmg naar je Mac; deze staat meestal (X: is je Windows drive) op:
    64-bits systeem: X:\Program Files (x86)\Embarcadero\RAD Studio\9.0\FireMonkey-iOS
    32-bits systeem: X:\Program Files\Embarcadero\RAD Studio\9.0\FireMonkey-iOS
  3. De file FireMonkey-iOS.dmg is een disk image.
    Mount het DMG image op je Mac. Deze wordt dan geopend in /Volumes/FireMonkey-iOS/ en er komen 2 vensters met de installers.
  4. Installeer beide in deze volgorde:
    a. fpc-2.4.4.intel-macosx.pkg (het vertelt dat het in 2 minuten installeert; dat duurt meestal korter)
    b. FireMonkey-iOS-XE2.pkg (het vertelt dat het installeert in “less than a minute”, maar meestal duurt dit veel langer, houd rekening met een kwartier of langer)
  5. Eject in de Mac Finder de DMG die je gemount hebt

Zie ook deze twee online installatie instructies:

–jeroen

via: Delphi XE2 Hands-On Workshop met better office – Barnsten.com.

Posted in Delphi, Development, Event, FireMonkey, PowerDay, Seminar, Software Development | Leave a Comment »

Delphi XE2 installation instructions on Windows and Mac (#ekon15 conference)

Posted by jpluimers on 2011/10/24

If you are attending the EKON 15 conference and want to prepare your laptops for some hands on experience, please follow the guidelines below.

I’m looking forward meeting a lot of interesting people, and having a great conference!

And if you are not attending, the below guidelines will help you get started doing cross platform FireMonkey development in Delphi :)

Installation instructions

Installation instructions on the Windows PC

  1. Install RAD Studio XE2 and the on-line help (use the default settings in all steps)
  2. Install InterBase XE Developer edition

Installation instructions on the Mac

For FireMonkey Mac OS X development

  1. Copy the file setup_paserver.zipto your Mac. Usually you can find it in here (X: is your Windows drive):64-bits system: X:\Program Files (x86)\Embarcadero\RAD Studio\9.0\PAServer32-bits system: X:\Program Files\Embarcadero\RAD Studio\9.0\PAServer
  2. Unpack the file setup_paserver.zip on your Mac (you will get the file setup_paserver)
  3. Run the setup_paserver on the Mac.
  4. InterBase Developer edition:follow the general Installation instructions on the Embarcadero site,followed by the speficif Mac OS X instructies on the Embarcadero site.

For Apple iOS (iPad, iPhone, iPod touch) development

  1. Download and Install Xcode 4 from the Apple site (you need to register for an account first) http://developer.apple.com/xcode/
  2. Copy the file FireMonkey-iOS.dmgto your Mac; Usually you can find it in here (X: is your Windows drive):64-bits system: X:\Program Files (x86)\Embarcadero\RAD Studio\9.0\FireMonkey-iOS32-bits system: X:\Program Files\Embarcadero\RAD Studio\9.0\FireMonkey-iOS
  3. The file FireMonkey-iOS.dmgis a Mac disk image.Mount the DMG image on your Mac. It will be openend in /Volumes/FireMonkey-iOS/ and you will see 2 installers.
  4. Install both in this order:a. fpc-2.4.4.intel-macosx.pkg (it tells you that it will take 2 minutes, usually it will take less time)b. FireMonkey-iOS-XE2.pkg (it tells you it installs in “less than a minute”, usually it takes much longer, and can take more than 15 minutes)
  5. In the Mac Finder, Eject the mounted DMG

See also these two online instructions:

–jeroen

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

SVN 1.7, TortoiseSVN and CollabNet 2.1.0 released earlier this week

Posted by jpluimers on 2011/10/14

Right after the Subversion SVN 1.7 release earlier this week, 3rd party providers announced new versions of their products too.

These are the updates of the ones I use most often:

Two major improvements for me:

  1. Improved meta data (read: only one .svn directory in the root of a working copy)
  2. Faster HTTP speed

Please also read Uwe Schuster‘s (the guy that implemented the version control integration for SVN and Git in the Delphi IDE) blog post on a few things you need to watch when upgrading to Tortoise SVN 1.7.

–jeroen

Posted in Delphi, Development, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

Impersonation on the iSeries: Changing Profile User

Posted by jpluimers on 2011/10/12

When running on Windows, changing the current user is called impersionation.

There are various ways to do this in Windows, including

On the iSeries, there is only one way, as everything goes through the same API: use QSYGETPH (Get Profile Handle) to verify a username/password combination and obtain a handle to the authentication token, then use QWTSETP (Set Profile Handle) to change the user currently signed on, as for instance mentioned by Colin Williams directing to the CHGCURUSR tool on FreeRpgTools.com and an article on Swapping AS/400 User Profiles by Shannon O’Donnel that comes with source code.

On the iSeries, when you are done, you should use QSYRLSPH (Release Profile Handle) when done impersonating, and you need to get the handle from the original user profile if you want to return to it.

The IBM documentation contains a small sample with QSYGETPH, QWTSETP and QSYSRLSPH that sets and restores the profile handle (edit 20120214: it got moved to http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapis%2Fapiexushand.htm)

Note that on both Windows ans iSeries, impersonation within a process/thread will make it run in the new context, but the process still keeps the identity of the user that started the process.

If you want to change that, then on both you need to start a new process from the impersonated thread.

In Windows, you can combine the impersionation and the creation of a new process by using the CreateProcessWithLogonW function (as mentioned at the Old New Thing by Raymond Chan). I’ve yet to find an equivalent on the iSeries.

–jeroen

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

EKON 15 conference news and discount (German text at the end of the blog post): Cary Jensen presents the keynote @caryjensen #ekon

Posted by jpluimers on 2011/10/11

EKON 15 – first day has many English sessions

From 26 till 28 of October, I’ll be speaking at the 15th EKON conference at the Renaissance Hotel in Düsseldorf, Germany.

I just sat next to the conference organizer, and he proudly announced that well known and long time Delphi guru Cary Jensen will be presenting the keynote on the evolution of Delphi from Delphi 1 to XE2.

I still have the disks marked “Wasabi” and “Mango” from the early 90s (and funny that Microsoft is using the same name for a 7.5 product, where Delphi 1 was a real revolution).

Next to the German sessions, there will be English sessions as well: Cary also does his other sessions that day (on cross platform development, windows services, and RESTful webservices).

Being a German conference, most of the other sessions will be in German, but it is good that the English ones are all in one day: you get a one-day visit to conference as a non-German speaker, get a discount and visit the beautiful city of Dusseldorf (especially the Altstadt is recommended).

Contact me for more information on discounts: there are both discounts for the English day and the full the whole conference.

On the EKON 15 site there is a nice conference planner and session overview.

Last but not least, on friday after the conference, Edwin van der Kraan and I will present a full day Delphi XE2 workshop covering x64, new VCL and of course FireMonkey cross platform development (so bring your Mac and iOS devices with you!).

15. EKON Konferenz – Delphi XE2 und mehr…

Vom 26. bis zum 28. Oktober findet die 15. Entwickler Konferenz (EKON) im Renaissance Hotel in Düsseldorf statt. Ich werde als Speaker ebenfalls vor Ort sein.

Als ich gerade mit dem Organisator der Konferenz zusammen saß, verkündete er mir stolz, dass Cary Jensen, bekannter und langjähriger Delphi-Guru, auf der EKON 15 eine Keynote zu Delphis Evolution von Delphi 1 zu XE2 halten wird.

Ich bin immer noch im Besitz von Disketten aus den frühen 90er Jahren, die mit „Wasabi“ und „Mango“ beschriftet sind (witzig dabei ist, dass Microsoft den gleichen Namen für ein 7.5-Produkt nutzt, während es bei Delphi 1.0 eine richtige Revolution gab).

Neben den deutschen Sessions werden auf der EKON auch Sessions auf English angeboten: Cary wird unter anderem auch über Cross-Plattform-Entwicklung, Windows Services und RESTful Web Services sprechen.

Zwar werden die meisten Sessions auf Deutsch gehalten, jedoch gibt es diesmal eine Besonderheit bei den englischen Sessions: Diese finden an einem Tag statt!
Somit können auch die Nicht-Deutschsprachigen für ermäßigten Eintritt an den Sessions auf Englisch teilnehmen und ganz nebenbei die schöne Innenstadt Düsseldorfs erkunden
(besonders die Altstadt ist sehr empfehlenswert).

Zu guter Letzt präsentieren Edwin van der Kraan und ich am Freitag einen ganztägigen XE2 Power Workshop zu x64, New VCL und natürlich zur FireMonkey Cross-Plattform-Entwicklung (bringen Sie also Ihre Macs und iOS-Geräte mit!).

Bei weiteren Fragen, Interesse und Infos über die Ermäßigungen können Sie mich gerne kontaktieren (Ermäßigte Preise gibt es sowohl für den English-Day als auch für die Gesamtkonferenz). Auf der Website finden Sie eine übersichtlichen Zeitplaner, die Sessions im Überblick und alle weiter Informationen zur Entwickler Konferenz.

–jeroen

Posted in About, Conferences, Delphi, Development, EKON, Event, Personal, Travel | Leave a Comment »