3
votes
Two FireMonkey nasties
Delphi Haven
– As the title says, here’s two little FireMonkey nasties I’ve got round to QC’ing: 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) 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 can quickly cause nasty, generic access violations on typos rather than a clean exception that shows where the error actually lies ...
Statistics
|
Visits by Source |
User Actions |




