Loving CALL WORKER, CALL FORM, and C_OBJECT

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Loving CALL WORKER, CALL FORM, and C_OBJECT

4D Tech mailing list
I may be easily amused, but I continue to find new uses for Workers and Call Form that make me say wow; and C_OBJECTs make it all so very clean and efficient…

This weekend I had a situation where I had a main process with dialog that needed to spawn another process with dialog. Then that second process needed to spawn a third process with dialog. All three dialogs while working independently of each other, needed to be able to tell the other processes to do various admin functions or refreshes. Some while actively being used by the user and all when closed.

Ok, in the past this would have required each process to know the process numbers of each of the other processes via passed parameters or global variables and each process had to have an On Outside Call event enabled to handle the calls. Not a big deal but things could get pretty convoluted in a hurry.

Now CALL WORKER and CALL FORM make this scenario a whole lot easier and compact. I created a worker process and have it spawning all the processes. A process needing to spawn another process tells the worker to do it. The worker easily keeps track of all the process numbers and window references of the processes it spawns.

Then when a process needs to tell one or more of the other processes to do something, it simply calls the worker process with a C_OBJECT containing the instructions of what it wants done and by which process. The worker process in turn communicates those instructions (C_OBJECT) to the desired process with CALL FORM.

Anyway, like I said, I am easily amused.

John



John Baughman
Kailua, Hawaii
(808) 262-0328
[hidden email]





**********************************************************************
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:[hidden email]
**********************************************************************