On 03/16/2014 02:47 AM, Marcos Douglas wrote:
Hi,

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?

PostMessage only need to know a Handler and a Integer (message). It
can send a broadcast message as well.

QueueAsyncCall need to know the instance and the method to call...


So, what the best way to substitute PostMessage?
Maybe using QueueAsyncCall  +  IFPObserved/IFPObserver?

Why you must substitute PostMessage ? I'm using PostMessage successfully for inter-thread communication,also I'm using QueueAsyncCall when I want to delay something eg. in OnShow of form ...

zeljko




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

Reply via email to