I just ran into a weird one that I figure is worth passing along. I went
with an alternative design and haven't dug all the way down on this
one...so it's just a note for anyone finding this in the archives later.
Or, a quiet cry for help to anyone that's already sorted this out.

Here's the setup, I've got a form that calls a worker. The worker does its
thing and calls back the form. This is a pretty vanilla way to use forms
and workers. I'd call it right square in the middle of "typical."

So, the worker calls back with some results and I want to show them. I
thought, "Hey! I'll use a sheet or modal." So I fire up some code I've used
for years for such things and....the window gets stuck. You can't close it,
you can't click behind. The best you can do is bring up the Runtime
Explorer and kill the whole form process. This business also makes 4D kind
of crashy. (Tried in V16.0 & V16R2, same same.)

<snip>Time banging away at my form, form code, and window code. All of
which bores me to tears.</snip> No difference. When I started breaking it
down and putting in more widgets to test things out, what I figured out is
that there wasn't anything at all wrong with the window/form code. Put it
on a button on the form and call it directly? Good as gold. Digging further
I found that the cycle looks like this:

* Form calls worker.
* Worker calls form.
* Form puts up window.
* Worker calls form for another reason. (Entirely valid.)
* You are so stuck.

The window catching the events is the base window, not the second dialog.
(Messages are sent to windows - windows hold the queue. Not that they are
really messages, and not like it's really a queue from our perspective. But
I digress.)

I tried some snappy fresh POST KEY code, but it didn't help. I kind of
thing this might be a wrench-in-the-gears thing.

Having a worker send 1+ messages to a form at some unpredictable frequency
is a pretty normal thing to do. Therefore, I assume there's something basic
I don't get. I've spent virtually all of my time with CALL FORM and CALL
WORKER in the headless plumbing so I'm very receptive to the idea that I'm
missing the dead obvious.

So, again, a bit of info for the archives and quiet cry for help from those
that have invested more time in the form/window part of all of this.
**********************************************************************
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:[email protected]
**********************************************************************

Reply via email to