views:

268

answers:

1

hello,

how to extract RTTI info about methods in Delphi records? is it possible by using new Rtti unit?

+3  A: 

There is no RTTI for methods on records, sorry.

Barry Kelly
is any chance to implement RTTI for methods on records in future?
HNB
@HNB - 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.
Barry Kelly
@Barry Kelly - 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:
HNB