Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Compiler
Delphi
Anonymous Methods
BASM
Code Generation/Optimization
Error Recovery
Errors - Warnings
Exceptions
Execution
Finalization
Generics
Header Generation
Interaction with UI
Interfaces
Language
Linker
Make Logic
Memory Manager
OBJ Generation
OBJ Support
Other Compiler
Packages
RTTI
Custom attributes
String Resources
TD Debug Info
Thread Local Storage
Version resilience
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Compiler/Delphi/RTTI
[ Add a report in this area ]
Report #:
105814
Status:
Open
[x64] IsStoredProp function in the System.TypInfo unit does not support indexed properties when compiling to 64-bit
Project:
Delphi
Build #:
16.0.4429.46931
Version:
16.4
Submitted By:
Sergey Mogilnikov
Report Type:
Basic functionality failure
Date Reported:
5/23/2012 1:07:15 AM
Severity:
Serious / Highly visible problem
Last Updated:
5/24/2012 12:15:00 AM
Platform:
All versions
Internal Tracking #:
28459
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:
1
Description
[x64]
The IsStoredProp function in the System.TypInfo unit does not support indexed properties when compiling to 64-bit.
The IsStoredProp function works as expected when compiling to 32-bit
Steps to Reproduce:
See the attached example.
-----------------
unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
function GetMyProperty(const Index: Integer): Boolean;
function IsMyPropertyStored(const Index: Integer): Boolean;
procedure SetMyProperty(const Index: Integer; const Value: Boolean);
published
property MyProperty1: Boolean index 0 read GetMyProperty write SetMyProperty stored IsMyPropertyStored;
property MyProperty2: Boolean index 1 read GetMyProperty write SetMyProperty stored IsMyPropertyStored;
property MyProperty3: Boolean index 2 read GetMyProperty write SetMyProperty stored IsMyPropertyStored;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses
System.TypInfo;
{ TForm2 }
procedure TForm2.Button1Click(Sender: TObject);
begin
if IsStoredProp(Self, 'MyProperty1') then // Must return true, see IsMyPropertyStored method for implementation details
ShowMessage('Ok!')
else
ShowMessage('Failed!');
end;
function TForm2.GetMyProperty(const Index: Integer): Boolean;
begin
Result := True;
end;
function TForm2.IsMyPropertyStored(const Index: Integer): Boolean;
begin
Result := Index = 0; // only first property should be stored
end;
procedure TForm2.SetMyProperty(const Index: Integer; const Value: Boolean);
begin
// do nothing
end;
end.
-----------------
Workarounds
None
Attachment
105814.zip
Comments
Tomohiro Takahashi at 5/24/2012 1:39:04 AM
-
This report was opened with valid Internal Tracking Number.
Thanks.
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us