v18.1, Mac What can a worker process do by way of UI? Are there any restrictions?
Situation: I have a task which takes a while to set up but which, once set up, runs swiftly, perhaps quite often. At present, I just wait for the setup to complete, but while it’s only a few seconds, it’s boring. Initialisation involves opening a window offscreen, containing a View Pro area for use in importing Excel spreadsheets. Getting data involves importing the spreadsheet and extracting and analysing the data, and is very fast. So, I thought this might do. At startup, CALL WORKER to get the window opened (using DIALOG(…; *). When data import is wanted, CALL WORKER with the path to the spreadsheet. The worker then does the “getting data” bit of the task. It then has to pass the data back to the waiting caller, which may then show it in a dialog. If before calling the worker, the caller has opened a window, there’s no problem: the worker can use CALL FORM. But sometimes, there will be no data to display and it will look ugly if the window opens and then closes. One solution would be for the caller process to be hidden until it has data to show in the window, and then to call SHOW PROCESS on itself. But it might be easier if the worker process simply did the display itself, if it opened the window and interacted with the user, avoiding the need to pass anything back to the caller. The caller could simply issue the CALL WORKER message and exit. Is there any objection to that method of doing things? The documentation doesn’t suggest that workers can’t have a UI. Maybe I’m stretching the use of a worker process past that which was intended. Any thoughts, or indeed comments on the idiocy of my thinking and my foolishness in having missed an obviously easy solution, gratefully received. Jeremy PS: why does it take 4D nearly 3 seconds between showing a form after a call to DIALOG, a form which has no form method and contains only a View Pro area, and the On VP Ready event? ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

