Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/06/21 in all areas

  1. Dalija Prasnikar

    Out parameter is read before set

    It is valid alert. You need to initialize out parameters before they are used. Only managed out types will be automatically initialized. When you mark parameter as out, you are saying I will properly initialize that variable (setting to nil is also proper initialization in this context) If you don't initialize that parameter inside the method, then this is a bug and your method signature is telling a lie. If you want to initialize variables outside the method, then you should use var parameter. The fact that Delphi automatically initializes only managed out types, is just implementation detail of the compiler. In theory it is behavior that may change, most likely it will not, but out parameter is meant for output, compiler is free to discard its value in the function prologue.
  2. Anders Melander

    OleSetClipboardData and delayed rendering

    Works for me. Here's what I'm seeing when I copy to the clipboard using the Drop Target Analyzer from the D&D Component Suite: I copied to the clipboard (blue bullets) and after a while (3.6 seconds) I pasted from the clipboard. The red bullets indicates the calls made from the drop target to the drop source. The list on the right are the data formats requested by the drop target. As you can see there are no calls made on the IDataObject until I paste from the clipboard. Here's the corresponding view from the drop target (the Drop Source Analyzer): Maybe you have an application running which monitors and reads from the clipboard?
×