<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">Am 03.02.2018 09:11 schrieb "Michael Van Canneyt" <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><br>
<br>
On Sat, 3 Feb 2018, Dennis Poon wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
If your objects inherit from TComponent and you use published properties you can use the streaming screen of the RTL.<br>
<br>
</blockquote>
I am curious how TComponent save and restore TnotifyEvent fields. Can you explain a little bit?<br>
</blockquote>
<br></div>
Roughly:<br>
<br>
If you put a method in the published section of an object, its name is<br>
written to RTTI. It can be retrieved and set using the RTTi based on the<br>
name: when saving, the name is written to stream, when loading, the name is<br>
looked up in RTTI.<br>
<br>
The classes TReader and TWriter in the classes unit perform this work.<div class="quoted-text"></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Of course this only works for methods that are published. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, what is 'streaming screen' of RTL? How to use it?<br>
</blockquote>
<br></div>
He meant the streaming system, I suppose. TComponent, TReader and TWriter<br>
together form the streaming system.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Correct. Stupid autocorrection -.-</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div></div>