On Mon, Mar 17, 2014 at 11:11 AM, Michael Schnell <[email protected]> wrote: > On 03/17/2014 01:31 PM, Marcos Douglas wrote: >> >> Yes, but the QueueAsyncCall needs to know what procedure to call for a >> especific object (instance) > > > I don't understand. > > The definition of the function (I use) is > > procedure TApplication.QueueAsyncCall(const AMethod: TDataEvent; Data: > PtrInt); > > with > > TDataEvent = procedure (Data: PtrInt) of object; > > > I don't see an "instance" here.
CASE 1: You have MainForm (Main) and ProcessForm (Proc). Proc do not know Main but Main needs to be updated about what happen in Proc so, Proc can use QueueAsyncCall that need a TDataEvent procedure as argument. If Proc not know Main, how he know the procedure (TDataEvent) to pass on argument? Sugestion: I can Create Proc passing the procedure (TDataEvent) to call inside Proc. CASE 2: You have MainForm (Main), InfoForm (that have 2 Frames F1 and F2 that not know InfoForm) and ProcessForm (Proc). Proc do not know Main, InfoForm or frames but they needs to be updated about what happen in Proc so, Proc can use QueueAsyncCall that need a TDataEvent procedure as argument. If Proc not know about these "Handlers", how he know the procedure (TDataEvent) to pass on argument? -- I think that I need is too much for a simple call to QueueAsyncCall. I'm doing tests with FP Observer implementation too. Best regards, Marcos Douglas -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
