On Mon, Mar 17, 2014 at 3:12 PM, Joao Morais <[email protected]> wrote:
> Em 15/03/14 22:47, Marcos Douglas escreveu:
>
>> So, what the best way to substitute PostMessage?
>> Maybe using QueueAsyncCall  +  IFPObserved/IFPObserver?
>
>
> Have you tried decoupling your classes with interfaces?

I thought, yes, but I want to keep simple as possible.

> If I understood your
> scenario correctly: Main implements an interface known by Proc, which sends
> itself to the Proc constructor.

That's an idea... but isn't like that today. Proc (following example)
do not know Main or any interface that Main knows.
Proc could be used in many others classes and not knows nothing about
these classes.

Using PostMessage Proc just notify "handlers" about a message with the
possibility to send "value objects" too.

Regards,
Marcos Douglas

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to