> On May 18, 2017, at 5:38 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:

> * Workers don't die when their work is done, they wait. 

A method called by New Process
  $w:=Open Form Window("ShowRecord")
  Dialog("ShowRecord")
  ExitCode

A method called by CALL WORKER
  $w:=Open Form Window("ShowRecord")
  Dialog("ShowRecord";*)

So this is why when using CALL WORKER, the Dialog(*) windows hang around after 
the method has been exited.
This means moving the process ExitCode from the lines after Dialog into a 
form's "On Unload" event.

> but there are functionally two loops
A forms execution environment could be visualized as:
If (Worker called)
  // do worker method
Else
  // do form method
End if


> The method has
> access to all of the process values (variables, etc.) and the "form
> variables" of the specific form in the specified window.

If several forms were open in a process, would it matter which form was called? 
 A form's local variables are outside the purview of the "Worker called".  No 
event is triggered.  Any variable changed need a Call Process (-1) for their 
display to change.
On the other hand, this is where form object names make the context significant?


Handy use example:
A method that saves a file, processes it, and deletes the file got a 
significant performance boost when the delete part was handed off to a CALL 
WORKER invoked method.

Thanks,
Keith - CDI
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to