Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE    [ Add a report in this area ]  
Report #:  98590   Status: Closed
incorrect code generated by Delphi XE + XE2 IDE for event handler
Project:  Delphi Build #:  XE, XE2
Version:    16.2 Submitted By:   Cris Peeters
Report Type:  Basic functionality failure Date Reported:  9/6/2011 1:51:32 AM
Severity:    Critical / Show Stopper Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   289078
Resolution: Duplicate (Resolution Comments) Resolved in Build: : Update 4
Duplicate of:  89662
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
there are a number of duplicate issues but it is not an Indy issue; it is an IDE issue and a very anoying one.

If one cannot trust the code the IDE generates... why would I trust the compiler to generate executables that actually work. This is mindblowing ! I understand there may be bug in software; I cannot understand why it is not fixed in the latest XE2 release.

This is going to be a "showstopper" in all of my new projects (32 and 64 bit)
Steps to Reproduce:
Incorrect code generated by Delphi XE + XE2 IDEfor event handler

***  Using Delphi XE2 !!



1. Create a new VCL application.
2. Place an tidUDPserver component on the new form
3. Double click the OnUDPRead event

generates error: "Expected '>' but '.' found."

generated code:
procedure TForm1.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread;
  AData: TArray<System.Byte>; ABinding: TIdSocketHandle);
begin

end;

the AData: TArray<System.Byte> should be AData: TidBytes as declared in

(idUDPserver.pas:)
...  
TUDPReadEvent = procedure(AThread: TIdUDPListenerThread; AData: TIdBytes; ABinding: TIdSocketHandle) of object;


(idGlobal.pas)
...
  {$IFDEF HAS_TBytes}
  TIdBytes = TBytes;
  {$ELSE}
  TIdBytes = array of Byte;
  {$ENDIF}


(System.SysUtils.pas)
...
  TBytes = TArray<Byte>;


(System.pas)
...
  TArray<T> = array of T;

cannot believe this bug is still in XE2 ! Please fix this. I was already reported by Indy
Workarounds
None
Attachment
None
Comments

Tomohiro Takahashi at 9/6/2011 8:17:46 AM -
This Indy component's event handler generation issue is not fixed yet...
There are lots of similar issues reported in QC(e.g., 88816 etc...).

Cris Peeters at 9/7/2011 5:15:33 AM -
Yes, there are a number of duplicate issues but it is not an Indy issue; it is an IDE issue and a very anoying one.

If one cannot trust the code the IDE generates... why would I trust the compiler to generate executables that actually work. This is mindblowing ! I understand there may be bug in software; I cannot understand why it is not fixed in the latest XE2 release.

This is going to be a "showstopper" in all of my new projects (32 and 64 bit)

Jacques Debouche at 1/7/2012 9:20:45 AM -
Where is Borland Time !!!  I did stop All delphi Development since delphi7. I likes to Evaluated XE2 and bought it few weeks Ago, I am really P...O.. Indy Full of bug's. And this one not yet solved after month...

Please send me the proceudre for refunding...

Jacques Debouche

Tomohiro Takahashi at 1/8/2012 4:44:23 PM -
We hope this issue will be fixed in next update release for XE2(e.g., Update 4).
Please stay tuned.

Vladimir Sokolov at 5/11/2012 1:41:26 AM -
Still not fixed in an update 4 also.

Tomohiro Takahashi at 5/11/2012 7:21:50 AM -
In Delphi XE2, this issue was fixed. But, C++Builder XE2 still has this problem.

Server Response from: ETNACODE01