I'm a puristic person and perfection maniac. Every of tens of thousands of MP3 files in my audiobook library must have a precisely filled up ID3 Tag and correct file name. For most operations on both tags and filenames, I'm using my own piece of software, written in Delphi years ago. However, since it does not support operations on ID3Tagv2, I was forced to strip these tags manually, using "magical" key combination in Winamp (see below). But, for large set of files some batch program must be used. And here you'll find short notice on some of them.
Using non-Latin keyboards with Delphi and non-Latin characters in code was always a big problem in Delphi.
To enable correct support in Delphi 10 you have to:
- go to
Tools > Options > Editor Options > Key Mappings,
Use Ctrl-Alt keys.
Hopefully in Delphi 2010 you can do this from IDE settings. You don't have to play with stupid
.reg files to change some dully strings in Windows Registry, as you were forced in Delphi 5 to achieve the same.
TListView supports checkboxes out-of-the-box. You just have to set
True and iterate through
TListView.Items to find, if particular item have
Checked property set to
True. You can even enable your own
OnCheckboxClick event (not available by default) -- I wrote about it here. But very similar to
TTreeView does not support checkboxes by default at all.
So, you have to craft entire solution yourself.
Unfortunately, the TListView object does not have a specific event fired, when the
Checked state changes for a TListItem (an item in the ListView). If you need to react in such situation, you have to mimic this behaviour yourself. Here are some tips on this.
Every Delphi's Guru will probably think about subclassing and catching windows messages here. If you're one of them -- at delphi.about.com you'll find an example. But, there's an easier way to achieve the same.
There's an (probably very) old About.com Delphi's article on how to build simply MP3 Player using only TMediaPlayer component available in every Delphi edition. Since powerful XAudio is no longer offcially available to Windows developers and other MP3 players or components are quite expensive, when it comes to pay for the license, then this could be a good alternative. But, this article catched my attention for a completely different reason -- reading and writing ID3Tag v1 in MP3 files, without using external libraries, just the pure Delphi code.
XAudio SDK probably is (or at least was) the most powerful, yet freeware Software Developer Kit for playing MP3 files in Delphi. It offered outstanding possibilities. Let's say that fifty (!) events, you could use to write any MP3-related software in Delphi is enough good mark. And there's more. That is why, it was really pity to me to discover, that this library is no longer available neither to Windows nor free. And finding replacement is really hard, if not impossible.
This article discusses using of ternary operator, a very usful yet not so famous, logic operator (