TIdUDPServer, TIdTelnet, and TIdIPMCastClient changes in XE3
In XE3, Embarcadero changed the signature of the
TIdUDPServer.OnUDPRead event in their bundled copy of Indy 10. This was
done in an attempt to address a slew of related QC bug reports (#88816,
#89298, #89662, #92067, #93672, #94969, #97943, #99863, #103088, #104825) so the Delphi compiler would generate RTTI that allows
the IDE to produce an event handler that is compatible with both Delphi
and C++Builder without errors and without requiring additional
RTL/compiler changes (which are actually needed to solve the root cause
of the original errors). Specifically, the AData parameter of the
OnUDPRead event was changed from a Dynamic Array to an Open Array.
Consequently, the parameter signature of this event is now different, which means
that pre-existing user code that uses the TIdUDPServer.OnUDPRead event in earlier IDE versions will no longer work correctly without being updated
This change was NOT approved by the Indy development
team, and Embarcadero did NOT apply their change to other areas of Indy
that are affected by the same issue, such as the TIdTelnet.OnDataAvailable and IdIPMCastClient.OnIPMCastRead events. To maintain
a single codebase, these changes have now been merged into subsequent SVN
releases of Indy 10.
Update, Oct 23 2012: changing the events to use an Open Array has caused new problems. So in a near-future Indy release, the events will go back to using a Dynamic Array again. However, changing TIdBytes into a plain Dynamic Array on all compiler versions, not mapping to System.TBytes or System.TArray anymore (which was the root of the problems), breaks compatibility with Sysutils.TEncoding in Delphi/C++Builder 2009+, so w have some compatibility issues to resolve before the events can be fixed.