LCL: Menu items cannot be streamed into arbitrary stream (to copy items) but Delphi can do that
Original Reporter info from Mantis: AntonK
-
Reporter name: Anton Kavalenka
Original Reporter info from Mantis: AntonK
- Reporter name: Anton Kavalenka
Description:
Currently Tmenu and TmenuItem getChildren() implementations works only if the current Stream.root component is equal to child's.Owner
i.e. there is no possibility to stream Items list outside the generic component streaming mechanism.
The following code works in VCL but not in LCL
var
item:TmenuItem;
SomeStream.WriteComponent(item); // this should store item and it's children.
Steps to reproduce:
Run the attached test application w/o patch.
The application on pressing button should copy form PopupMenu items to the items of MainMenu. The caption of main menu item displays number of bytes written.
Non-patched LCL: writes empty menu item (17 bytes)
Patched LCL: writes about 2K
Mantis conversion info:
- Mantis ID: 18106
- Build: r28556
- Platform: All
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 28560 (#70fdb2d0)
- Target version: 0.99.0