Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!helios.ee.lbl.gov!pasteur!ucbvax!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: callbacks Message-ID: <8912151300.AA14880@LYRE.MIT.EDU> Date: 15 Dec 89 13:00:27 GMT References: <8912142136.AA19443@cscsun1.larc.nasa.gov> Sender: root@athena.mit.edu (Wizard A. Root) Organization: DEC/MIT Project Athena Lines: 15 > I am having problems with callbacks. I have a commandWidget that has two > callback routines. One of these routines enables a popup. Based on an error > condition in my program, I want to remove the enabling of the popup from the > callback list. I tried using XtRemoveCallback but it seems to "miss" the first > time around and still pops up the popup. You're not, by any chance, calling XtRemoveCallback from a callback that's on the list you're trying to change, are you? There is special code to make sure that any changes to a callback list do not affect an in-progress evaluation of that list, producing exactly the symptoms you describe. Since there is no explicit ordering of invocation of the callbacks on a list, you could never rely upon an "earlier" callback being able to disable a "later" one by removing it from the list anyway.