TWriter.WriteProperty writes TMethod value of null when the property is assigned but not resolved with MethodName
Original Reporter info from Mantis: AntonK
-
Reporter name: Anton Kavalenka
Original Reporter info from Mantis: AntonK
- Reporter name: Anton Kavalenka
Description:
Sometimes writing complex components requires creating components inside and point the events to the methods of embedded components.
Clear example is TSpinEdit containing the TSpinButton and TEdit, referencing each other.
Streaming such components lead to storage of unnecessary NIL for events, assigned programmatically (for instance in constructor).
Reading such streams resets events to NIL, so assigned (by developer) event handlers stop working.
Delphi does not write assigned properties of type TMethod, when the TMethod.Code cannot be resolved using MethodName(ACode).
Steps to reproduce:
See the #13846 and attached project.
Mantis conversion info:
- Mantis ID: 14798
- OS: Debian GNU/Linux
- OS Build: 5.0
- Platform: x86_64
- Version: 2.5.1
- Fixed in revision: 14166 (#f326302a)
- Target version: 2.5.1