Path: utzoo!mnetor!uunet!nbires!hao!noao!stsci!barsh From: barsh@stsci.EDU (John Barshinger) Newsgroups: comp.sys.amiga Subject: To any Task/Port/Window Gurus (Help) Message-ID: <183@ra> Date: 8 Jan 88 03:17:02 GMT Organization: Space Telescope Science Institute, Baltimore, MD 21218 Lines: 55 To a task/port GURU: I would like my main process to open two windows, one for typical output and the other for a gadget. I am creating a task in my program for the sole purpose of responding to the second window/gadget. Is there any way to fake out the Amiga to set a signal bit in task2 so that I can just wait for it as if task2 had opened the window. I realize that I could just open the window in task2, but then I would need to create more ports (and use more memory, etc) just to send messages to terminate the program and synchronize closing the windows before closing the custom screen. (if I don't open/allocate anything in task2, when main terminates, Task2 will also go away without any adverse effects, right?? It seems like task2 should be allowed to access the main process memory utilizing the Forbid, Permit sequence, is this correct? This is what I had been doing: in task2 - guru city - :-< igwin is a pointer to the gadget window in the main process if ((sigbit = AllocSignal(-1)) != -1) { Forbid(); igwin->UserPort->mp_SigBit = sigbit; igwin->UserPort->mp_SigTask = FindTask(0); Permit(); } msg = WaitPort (igwin->UserPort); The sole purpose of all this is so that when my program is off doing its thing, the gadget will still get serviced and do its thing. (kinda like the Depth gadgets, no matter what the program is doing, the Depth arrangements still arrange depths). If anyone has any other/easier ways to accomplish this, I'm all ears... thanx, jrbii ~~~~~ -- John Barshinger Space Telescope Science Institute Baltimore, MD 21218 plink:jrbii | bix:jrbii | barsh@stsci.edu