unit JvDeprecated deprecated 'Here are helpers for compilation compatibility with obsolete code. Please, do fix your code instead!'; interface uses JvComCtrls; (** should just use any unit it deals with. No reason for optimisations and modularizations of legacy band-aid. The more uglier it gets - more reasons would developer have to fix his code instead. Same is about compatibility with all versions of Delphi, it just is not worth the candles **) type (* Section for: JvComCtrls.TJvIPAddress Introdiced at: December 2011 Expected removal at: December 2012 *) Depr_IPAdress_AVprop = record private ObjRef: TJvIPAddress; function GetAddress: Cardinal; inline; procedure SetAddress(const AValue: Cardinal); inline; procedure SetValues(Index: Integer; Value: Byte); inline; function GetValues(Index: Integer): Byte; inline; public property Address: Cardinal read GetAddress write SetAddress; property Value1: Byte index 0 read GetValues write SetValues; property Value2: Byte index 1 read GetValues write SetValues; property Value3: Byte index 2 read GetValues write SetValues; property Value4: Byte index 3 read GetValues write SetValues; end deprecated; Depr_IPAddress = class helper for TJvIPAddress public function AddressValues: Depr_IPAdress_AVprop; inline; deprecated 'Use TJvIPAddress.AddressValue[Index] and TJvIPAddress.Address instead.'; end; (* Section end: JvComCtrls.TJvIPAddress *) (* more compatibility helpers to follow? *) implementation function Depr_IPAddress.AddressValues: Depr_IPAdress_AVprop; begin Result.ObjRef := Self; end; function Depr_IPAdress_AVprop.GetAddress: Cardinal; begin Result := ObjRef.Address; end; procedure Depr_IPAdress_AVprop.SetAddress(const AValue: Cardinal); begin ObjRef.Address := AValue; end; procedure Depr_IPAdress_AVprop.SetValues(Index: Integer; Value: Byte); begin ObjRef.AddressValue[Index+1] := Value; end; function Depr_IPAdress_AVprop.GetValues(Index: Integer): Byte; begin Result := ObjRef.AddressValue[Index+1]; end; end.