how to extract RTTI info about methods in Delphi records? is it possible by using new Rtti unit?
Delphi - RTTI info about methods in records
There is no RTTI for methods on records, sorry.
is any chance to implement RTTI for methods on records in future? –
Jandel
@Jandel - maybe, but the value proposition is different than for methods on classes. Having RTTI for methods on classes opens up remoting, automation, dynamic binding etc. but methods on records are less useful and have drawbacks, like the risk of operating on a copy of the record, rather than the original. Records have limited uses as it is - they are often an optimization, or designed to be immutable value types. As optimizations, they are best hidden behind OO interfaces. As value types, having RTTI available would perhaps enable scripting scenarios, but I'm not aware of other good arguments. –
Wychelm
scripting is a sufficient argument in my opinion :). it would be nice to have a "RTTI" even for the regular / normal procedures and functions in the interface section ... That would be the power for the scripts! The current "RTTI" is beautiful! ... but could be better:) "God bless Delphi" :g: –
Jandel
RTTI for methods in records was introduced in XE2, see example TRttiRecordType_(Delphi). –
Unbrace
© 2022 - 2024 — McMap. All rights reserved.