Two FireMonkey nasties
20 January, 2012
As the title says, here’s two little FireMonkey nasties I’ve got round to QC’ing that may be of interest to someone starting to play around with the framework:
- TBitmap.LoadFromFile does not raise an exception when the file does not exist – instead, it just silently returns (see QC 102636).
- TFmxObject.Children (which is equivalent to TWinControl.Controls in the the VCL) always returns nil on an out-of-range index rather than raising an exception. Combined with the fact the ‘as’ operator accepts a nil source, this causes typos to generate nasty, generic access violations rather than exceptions that tell you what the error actually is (see QC 102747).
Advertisement
No comments yet