On 03/16/2014 02:47 AM, Marcos Douglas wrote:
Like all Windows programmer, I use PostMessage/SendMessage a lot.
Lazarus team has created Application.QueueAsyncCall method to
substitute the (old) "Windowish" method todo async calls aka
PostMessage.

Ok. But what is the best way to use QueueAsyncCall when the caller to
not knows what type is the receiver?
As QueueAsyncCall does not exist in Delphi you might want to avoid it to stay Delphi compatible.

So you can use TThread.Queue that is available both in Delphi (even though undocumented in some older versions) and in Lazarus/fpc (even though only in the not too old versions).

QueueAsyncCall need to know the instance and the method to call...
QueueAsyncCall is given the procedure to call and a parameter for same, but no "instance". TThread.Queue only gets the (parameter-less) procedure to call.

-Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to