AW: Verständnisfrage zu TValue
Delphi-Quellcode:
function RestoreProperty(aInstance: TObject; const aPropertyName: string; const aValue: TValue): Boolean;
var prop: TRttiProperty; begin prop := TType.GetType(aInstance.ClassType).GetProperty(aPropertyName); prop.SetValue(aInstance, aValue.Convert(prop.PropertyType.Handle)); end; |
AW: Verständnisfrage zu TValue
Danke! Sehr cool.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:55 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz