Thursday, 6 September 2018

Conferences in Europe

Exciting times – conference season is upon us again and I’m excited to be heading off to a couple of them to talk to Delphi developers around Europe about subjects I’m passionate about.

First off, and it’s nearly here, is the Barnsten Delphi Conference 2018 in Utrecht in the Netherlands on Tuesday, September 18th. This is a one day event with a busy agenda. After the opening keynote from Delphi Product Manager Marco Cantú, I’ll be doing a plenary session on creating debugging techniques before the sessions split into 2 parallel tracks. In among these parallel sessions I’ll talk about Android API access and you can also choose from sessions by (among others) Bruno Fierens, Bob Swart, Danny Wind and Marco Cantú (again). These sessions are mostly in English, though a couple are not. This looks to be a great value day of Delphi expertise.

Later in the Autumn (or maybe it’s Winter by then…?) EKON 22 takes place from November 5th to 7th (Monday to Wednesday, with Wednesday being Workshop day). Again Marco Cantú will be doing the keynote and then we have lots of sessions in 3 parallel tracks, many in German, many in English. I’m presenting my Creative Debugging Techniques session first thing on the Tuesday. Other speakers include Stefan Glienke, Bruno Fierens, Marco Cantú (again), Andrea Magni, Ray Konopka and Cary Jensen (among others). You can peruse the full agenda here.
If you are thinking of going to EKON 22 you can get Early Bird discounted pricing until September 27th (see the registration page). Unfortunately I didn’t get to post about this before the Very Early Bird pricing ended, but Early Bird discount pricing is a good deal!

I hope to see some of you in Utrecht or Dusseldorf!

Tuesday, 7 November 2017

CodeRage XII session files – Directly Using The Android API

My CodeRage XII session on Directly Using the Android API has been aired on the Internet. If you saw it I hope it came across reasonably well (interruptions notwithstanding) and might prove useful to you in your endeavours with Android.

As promised, the slides and samples are now available at this link. Do enjoy, now ˚◡˚   [ Update: the broken link has been fixed ]

Apologies for the interrupted video transmission during the conference. Rest assured that as soon as Jim can manage it, pretty much all the CodeRage videos will be made available for replay. As soon as mine is available I shall be updating this post with the link and also linking to it on my Conference Talks web page. You can see it at your leisure now here at Embarcadero Academy.

CodeRage XII session

A whole 5 years ago (!) I did a session for CodeRage 7 on accessing the Android API. This was not long after RAD Studio XE5 introduced support for developing Android applications, and Delphi’s Android support was in its first stage.

5 years on and CodeRage XII is starting today. I’ll be doing an updated talk on the same subject covering all that’s new in RAD Studio 10.2 at 3pm CST today, Tuesday 7th November 2017. I hope you can join me!

A full timetable of sessions is available in this PDF download in case you’re having trouble working out which sessions to attend.

Sad for me (due to working on-site meaning I won’t be able to catch them – alas they won’t be made available as replays!) but hopefully fabulous for many of you (if you can attend the sessions) is the inclusion in the list of speakers of a couple of legends in their areas:

These are well respected industry luminaries and Malcolm Groves, among others, has a lot to say about them.

Enjoy CodeRage XII!

Sunday, 29 October 2017

‘What if?’ scenario analysis in the CPU window

Last Tuesday, 24th October I did some sessions at EKON 21, one of which was on Creative Debugging Techniques. During the session there was a section where I was trying to demonstrate an idea or technique that happened to fully involve the CPU window. Unfortunately a series of finger fumbles on my part meant I couldn’t show what I wanted to show, albeit I think the point was made.

Anyway, I mentioned that maybe I’d write up that little snippet into a blog post, just to prove that it really does work as I suggested it does, and so here it is.

Tuesday, 17 October 2017

Remote debugger recalcitrance

My development machine in my main week day job does not have some custom hardware that a nearby test machine does. It doesn’t make sense to load up the development environment onto the test machine for various reasons, so I am a fairly irregular user of remote debugging against my Win32 application.

As it happens the client language is C++Builder (classic compiler), but I expect this issue to apply equally to Delphi (I’d be interested to know from anyone who can confirm one way or another).

Remote debugging works quite nicely via PAServer. It is certainly straightforward in comparison to the games we had to play some years back – PAServer seems to have simplified the setup quite nicely.

Granted, stepping is pretty slow, but then there’s quite a lot going on and a certain amount of information for PAServer retrieve from the remote debugger (rmtdbg250.exe) and then to send back to PAClient and to the IDE, so I can take that.

What gets my goat, though, is what happens when the program ends. Often I have to kill the application (Ctrl+F2, or Run, Program Reset), but often the application exits quite naturally.

More often than not I can’t make a change in the code and have F9 successfully compile and run up the app remotely again. I get this:

[PAClient Error] Error: E0009 Cannot create file "\\?\C:\Program Files (x86)\Embarcadero\PAServer\19.0\scratch-dir\some_subfolder\project_name\project_name.tds". The process cannot access the file because it is being used by another process

Monday, 16 October 2017

Project corruption bug

Long ago there was an issue with the RAD Studio IDE (Delphi and C++Builder both). It meant that when changing certain project options or switching build configurations, the (XML format) project file would get saved with an extra errant (empty) XML element in it, causing subsequent compilations to baulk, complaining about: ProjectExtensions appears multiple time in project. If you build from the command line the error looks like: [MSBuild Error] MSB4079 The <ProjectExtensions> element occurs more than once.

The extra line in the file, were you to open it in a text editor and take a look, will be rather like this:

    <ProjectExtensions />

If you peruse some of the entries in Embarcadero’s Quality Central portal, such as this, this or even this, then you’ll see that Embarcadero made some changes in XE6 that improved matters (done against Quality Central bug 109016, no longer accessible since QC went offline some while back, but in this list of XE6 fixes), but clearly has not dismissed the problem entirely. Various customers do continue to hit it, albeit not very reproducibly.

Saturday, 14 October 2017

Delphi build/install/launch Android app from the command-line

Quite some while back I answered a question on Stack Overflow, which explained how to build a Delphi project from the command line and also how to deploy it. The context of the question was Andriod development

In the case of an Android application deploying it has absolutely nothing to do with installing the resultant .apk file onto your Android device, despite what your personal interpretation of the word may be. Oh no, most definitely not.

Instead, deployment is about packaging up all your various files - your compiled Android library (a .so file), all the images, splash screens, icons, custom files, databases, application manifest file and so forth – all into an .apk file. In other words as far as the Delphi IDE is concerned, deploying a Delphi project means going from a .so native ARM library to an installable .apk file.

Clearly when you press F9 or Ctrl+Shift+F9 to run your application the IDE works out how to install your .apk on the currently connected and selected device, but that is subsequent to the IDE’s notion of the deployment step.

So, installation notwithstanding, that SO answer shows how to make/build and deploy a Delphi project, such as an Android project, from a RAD Studio command prompt: