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

Delphi XE2 FireMonkey: the reason you should not have used assembly

Posted by jpluimers on 2011/09/09

Right now, I’m porting a bunch of stuff over to FireMonkey in Delphi XE 2 so it can run cross platform.
(Be sure to attend the RAD Studio XE2 World Tour when possible, this stuff is way cool!)

Having avoided Windows x86 assembly in my own sources for years, I’m astonished by the number of 3rd party libraries that do.

Right now, third party libraries that you want to use with FireMonkey need these requirements:

  1. In order to run on x64 or OS X:
    Don’t rely on x86 assembly instructions, or provide alternatives for other platforms than Windows x86
  2. In order to run on the an iPhone, iPad or iPod touch iOS device (which all run on Arm), or iOS simulator from the iOS SDK (which is not an emulator, it runs x86):
    Be compatible with Free Pascal 2.5.1.

And the fact that you should have separated your business logic from your UI logic years ago :)

Of course that was what the Future proofing your Delphi apps seminar from Simon Stuart was about.

What baffles me is that so little 3rd party code adheres to that.

–jeroen

PS:

Today and tomorrow I’m be at the German Delphi-Tage.de conference; I’ve already met a lot of people in the Delphi XE2 tutorial and look forward to meet more tomorrow.
Contrary to what the schedule says, my session on a pragmatic Delphi code generator will be in German, I’m sure most attendees will like that.

Sunday I’ll fly to SFO to speak at the DelphiLive.com conference in San Jose, CA.
There, my preconference tutorial on Delphi Certification and sessions on XML and XSLT will be in English, as I’m sure more people there understand that better than German :)

Posted in About, Certifications, Conferences, Delphi, Delphi-Tage.de, DelphiLive, Development, Event, FireMonkey, Personal, Software Development | 6 Comments »

ModelMaker Code Explorer 9.1.0 available for Delphi XE2

Posted by jpluimers on 2011/09/08

ModelMaker Code Explorer 9.1.0 was released yesterday which supports Rad Studio / Delphi XE2.

Highly recommended for building and refactoring Delphi applications!

–jeroen

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

EmbarcaderoTechNet’s Channel – YouTube

Posted by jpluimers on 2011/09/06

EmbarcaderoTechNet published a couple of interesting videos on YouTube covering Delphi XE2 including FireMonkey HD/3D, FireMonkey xPlatformVCL Styles and more.

All of them short (couple of minutes each) studio work with good video and audio quality (they default to 360p, but most are available in 720p HD, some just in 480p).

–jeroen

Via: EmbarcaderoTechNet’s Channel – YouTube.

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

Rad Studio XE2 demos up at SourceForge.net: Repository – [radstudiodemos] Index of /branches/RadStudio_XE2

Posted by jpluimers on 2011/09/05

Note to Self:

A few days ago, the Rad Studio XE2 demos became available at sourceforge.net: SourceForge.net Repository – [radstudiodemos] Index of /branches/RadStudio_XE2.

You can get them by SVN as well: http://sourceforge.net/projects/radstudiodemos/develop

–jeroen

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

delphi has TTransparentCustomControl in the Controls unit

Posted by jpluimers on 2011/08/23

Wow, I never noticed that Delphi 2006 introduced the TTransparentCustomControl.

I spotted it a while ago from the delphi – Transparent TCustomControl? answer on StackOverflow.

It is not used in the Delphi VCL itself, but a google search reveals that a few people have actually used it, and Steve Trefethen (former member of the VCL team) mentioned it too.

Note that it contains a [WayBack] mouse interception bug that is still open.

–jeroen

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

ISO 8601 Date, Time and DateTime in Delphi (was: Simple example to show DateTime.Now in ISO 8601 format on ideone.com | Online C# Compiler & Debugging Tool)

Posted by jpluimers on 2011/08/18

In the past I wrote about a Simple example to show DateTime.Now in ISO 8601 format on ideone.com | Online C# Compiler & Debugging Tool , using ISO 8601 in batch-files, and how ISO 8601 is used in Google Calendar URLs.

Time to write something about ISO 8601 Date, Time and DateTime and Delphi.

First of all the DateUtils unit contains a bunch of routines (for instance DecodeDateWeek) that understand ISO 8601 week numbers, where:

  • Weeks start at Monday
  • The first week of a year contains (these are equivalent):
    • The first thursday in that year
    • Has at least 4 days in that year
    • Contains the 4th of January

Otherwise the week containing January 1st is week 52 or 53 of the previous year

ISO 8601 also specifies how to format Dates, Times,  DateTimes and durations according to some basic principles.

XML uses ISO 8601 to format Date, Time and DateTime and some other formats as text too.

So it is no wonder that since Delphi 6, it contains a XSBuiltIns unit covering (among other things) ISO 8601 formatting.

Given the many Delphi ISO 8601 relates questions on StackOverflow of which I answered two, and my need for ISO 8601 DateTime conversion for exporting Excel XML, here is are some samples to get started in the unit below (and in this codeplex changeset).

The unit covers Date, Time and DateTime.
You can write similar code for Duration.

Oops, I covered it already in ISO 8601: Delphi way to convert XML date and time to TDateTime and back (via: Stack Overflow)

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, ISO 8601, Power User, Software Development | 4 Comments »

some reflections on #Delphi #FireMonkey support for #iOS based on the #FPC compiler that caused quite a surprise

Posted by jpluimers on 2011/08/17

When looking over a few forums, it seems that the way Delphi XE2 will support FireMonkey on iOS (by using FPC aka the FreePascal Compiler) was very surprising, even for the FPC dev team.

Actually, Embarcadero’s Michael Swindell posted some very interesting reactions on the Lazarus forum and his series of comments on Jon Lennart Aasenden blog entry discussing Delphi XE2 and iOS.

Recommended reading!

A lot of pieces of the puzzle fall into place now: Embarcadero aquiring KSDev (that made DXScene/VXScene), and the support in FPC 2.5.1 for a more Delphi Language compatible syntax, and Objective Pascal binding to Objective C as indicated by Phil Hess. VGScene already supported iOS using FPC in Delphi Mode, as this thread on the embarcadero forums also indicates, so it is logical that FireMonkey does too.

Embarcadero, FreePascal and RemObjects are in parallel (and sometimes cooperation) working on cross platform compiler development.
For the Mobile world, ARM (for iOS) and Java (Android, BlackBerry) are very important.

Clearly, Borland was far ahead of its time when they demonstrated their dcc32j Delphi to Java bytecode compiler proof of concept at BorCon conferences back when their opening evenents had great videos (I think it was both at BorCon 1998 and BorCon 1997), and not so great shifts (the Inprise identity crisis).

The same holds for the Sun’s slogan “the network is the computer” (actually by John Gage): basically that was about predecessors of Cloud computing.

Things from the past come back, sometimes presented as “new”, a few (partially from this Evolution of Pascal programmers.stackexchange.com thread):

All of those are (partial repetitions) of technologies that help you build systems. The trick is how to be able to quickly learn and apply those technologies (as opposed to add a bunch of TLAs or FLABs wich are about the only thing that most modern “recruiters” use to match résumés/CVs to positions).

Some of the things above have died, or are not in wide use any more.
That is OK: Life can’t have ups without having downs, and without some form of long wavelength repetitions: that’s what makes the journey so interesting (just think about the financial markets, there will be good times…).

Using FPC for iOS opens the road to develop applications using a very productive environment consisting of the Delphi IDE and the FPC compiler in a short while from now.

–jeroen

PS: two more events that I will be attending and/or speaking:

PS2: Now it probably is more clear why I bought and installed my Mac Mini Server last year :)

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

Back to the 80s: Apple Pascal on the Lisa Machine

Posted by jpluimers on 2011/08/15

Talking about Pascal history: Index of /pdf/apple/lisa/pascal_monitor.

That was then, soon it will become easy to write Pascal apps for Apple iOS using Delphi XE2 :)

–jeroen

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

Tomazy’s Software Development Blog: Testing modal windows in Delphi

Posted by jpluimers on 2011/08/14

Tomazy’s Software Development Blog: Testing modal windows in Delphi.

Recommended reading!

–jeroen

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

Windows authorization: Adding/Removing users from local groups

Posted by jpluimers on 2011/08/10

Though there are API ways to add users to local groups in Delphi, you need the JwaLmAccess unit from the JEDI API library project to import those.

Sometimes that is not feasible, and sometimes you want to just script things.

For those, you can use the Windows net localgroup command (if you have sufficient privileges, you can even apply it to the local groups on your domain controller by appending it with the /domain parameter, or use the net group /domain command to execute on global domain groups instead of local groups).

Sample of using this in a cmd script:

net localgroup Guests Me Myself I ACME\BugsBunny /delete

It will remove the local users Me, MySelf and I, and remove the domain user ACME\BugsBunny from the local group Guests.

Sample source of using this in Delphi: Read the rest of this entry »

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