Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/RTTI    [ Add a report in this area ]  
Report #:  88079   Status: Open
Add information on getter/setter of property
Project:  Delphi Build #:  15.0.3890.34076
Version:    15.0 Submitted By:   Eric Grange
Report Type:  New Feature Request Date Reported:  9/15/2010 12:33:32 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   280469
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 17
Description
RTTI information for a property currently doesn't provide information on the getter/setter methods of a property.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

Eric Grange at 9/15/2010 12:37:34 AM -
This could also provide a way to support array properties easily, cf 88075

Tomohiro Takahashi at 9/15/2010 12:46:09 AM -
Could you please provide more detail or sample code to understand your request?

Eric Grange at 9/15/2010 5:17:29 AM -
TRttiProperty only provides a GetValue and a SetValue, there is no reference or access to the TRttiMethod(s) a property uses as its accessors.

f.i. in

  function GetStuff : TStuff;
  function GetStuff1 : TStuff;

  property Stuff : TStuff read GetStuff1;

There is AFAICT no RTTI-visible relationship between the Stuff property and the GetStuff1 method.

The is also AFAICT no RTTI information on whether a property accessor is a method (like above) or a direct field access as in
  
   FStuff : TStuff;
   property Stuff : TStuff read FStuff;

Server Response from: ETNACODE01