Typcasting a RB Class
I have inherited from the standard ppDlg form: TppPrintDialog to enhance it.
One of my events for a combobox has the following warning:
[DCC Warning]: W1048 Unsafe typecast of 'TObject' to 'TppFileDeviceClass'
for the following code:
lFileDevice := TppFileDeviceClass(
cbxPrintToFileTypes.Items.Objects[iVal] );
lFileDevice is TppFileDeviceClass
Is there any way to get rid of this warning besides wraping it with {$WARN
UNSAFE_CAST OFF}?
Delphi 2007 Ent
RB 10.6 Ent
Thanks,
Ken Brumback
One of my events for a combobox has the following warning:
[DCC Warning]: W1048 Unsafe typecast of 'TObject' to 'TppFileDeviceClass'
for the following code:
lFileDevice := TppFileDeviceClass(
cbxPrintToFileTypes.Items.Objects[iVal] );
lFileDevice is TppFileDeviceClass
Is there any way to get rid of this warning besides wraping it with {$WARN
UNSAFE_CAST OFF}?
Delphi 2007 Ent
RB 10.6 Ent
Thanks,
Ken Brumback
This discussion has been closed.
Comments
The Delphi compiler warnings - UnsafeType, UnsafeCode, UnsafeTypeCast were
added prior to VCL.NET being released with the intent that developers could
prepare their VCL Win32 code to be compiled for VCL.NET. (The .NET framework
has stricter type checking than Delphi.)
ReportBuilder is compiled with those warnings turned off.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com