Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker.mit.edu!bloom-beacon!alphalpha.COM!nazgul From: nazgul@alphalpha.COM (Kee Hinckley) Newsgroups: comp.windows.x Subject: XmForm, XSync and 0 length timeouts Message-ID: <901201200548.24015@alphalpha> Date: 2 Dec 90 00:05:48 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 32 First of all, I think there is a bug in form, although I can't be sure, and I really don't have time to try and duplicate the problem. I have a Form with two children. I regularly destroy both children and create two new kids. This almost always works. However sometimes it stops working, and once it stops working it almost never works again. What happens is that it does the destroy fine, and it creates the new kids, and it manages them. But they never show up. The Form goes blank and nothing ever shows up in it. Very strange. However! I *think* I've fixed the problem (I'm not sure, because it's one of those things where I can prove it doesn't work, but I have to use it for ever to prove it does work). I did this by putting an XSync immediately after the destroy. If anyone has any ideas on what might be going wrong here, please let me know. BTW. I did step through the Form widget once when it was managing the kids and saw that the Form thought it had 4 kids, not 2. So it's almost like it didn't get rid of 2 for some reason? I haven't checked what it looks like when it *is* working though, so I'm not sure on this. Now, here comes the second question. What is the difference between doing a 0 length timeout and an XSync or XFlush (I'm aware of the difference between the latter two). In particular, there are certain things which only work if you set up a 0 length timeout (like setting the focus to a particular widget in a dialog box when you're in the focusCallback). Would those same things always work if I did an XSync instead? -kee