Sunday, February 02, 2025

Something that I should have learnt a long time ago in Delphi

I've shown the 'retrieve entry' form for the Blog Manager Program before; similar dialogs appear in other of my programs. In all of them, there is a short cut: should I enter an ID number or a date then pressing 'enter' is equivalent to pressing the 'show' button that retrieves the appropriate entries. This action has always been accompanied by a 'ding' and it seems that I've never been sufficiently motivated to discover why this 'ding' is sounded (I sort of know where it comes from).

Today obviously this did offend/annoy me so I went looking for the cause. The form's 'keypreview' property is set and the 'enter' is handled in the FormKeyDown method. This works but causes the ding. The solution is simple and I should have learnt this a long time ago: instead of using FormKeyDown, I should have been using FormKeyPress, as follows

procedure TChooseEntries.FormKeyPress(Sender: TObject; var Key: Char); begin if key = #13 then begin key:= #0; // prevent the 'ding' showbtnclick (nil); end end;

So simple. Now I suppose I'll have to change 40 forms in the OP's management program to stop it dinging all the time!



This day in history:

Blog #Date TitleTags
33202/02/2011A moment's hesitationMIDI, Robert Silverberg, Song writing, Soundclick, Hugh Grant

Saturday, February 01, 2025

Rebus III on TV

I've just finished watching the six episode series of 'Rebus' - this is the third television reincarnation of Rebus. First time around, he was played by the totally miscast John Hannah ('Four weddings and a funeral') and the second time by a more reasonably matched but still miscast Ken Stott. The third Rebus is played by Richard Rankin, presumably no relation to author Ian Rankin. Indeed, Rankin is a very common Scottish surname.

The cast is a complete mélange of all the books: Rebus here is a sergeant (only in the first book prior to being promoted to Inspector), Gill Templar is his DI, Siobhan Clarke is his DC (she only entered the cast in the seventh or eighth book), Malcolm Fox is present (a much later addition to the books), and the villains are Michael Rebus, Ger Cafferty and Daryl Christie. Rebus' ex-wife and daughter, Shona and Sammy, are also present.

The story is not based on any book and is reasonable, if not particularly compelling. Many people get shot. I wouldn't particularly recommend this to anyone.

On the other hand ... prior to the final episode being broadcast, there were promos for other series to be broadcast, and one of those is the fourth (?) series of 'Strike' - 'The ink blood heart'1! Not only that, it appears that its first broadcast was a few days ago but it's being repeated at 5 pm this afternoon. Not bad, considering that it was shown in Britain only a month ago.

It will be interesting to see how the book is turned into a television show, as much of the book is devoted to online chatter. Not the best detective story in the book series, but very important in the slow development of what is termed on-line as 'Strellacott' - the relationship between the two protagonists.

Internal links
[1] 1526



This day in history:

Blog #Date TitleTags
33101/02/2011Project management exam - resultsMBA, Project management, Marketing
100401/02/2017John Wetton, RIPObituary, King Crimson
110901/02/2018Travelling to Karmiel with my new headphonesTom Clancy, Headphones
128901/02/2020Thesis updateDBA