Path: utzoo!attcan!uunet!husc6!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: question regarding toolkit callback functions Message-ID: <8807181258.AA10443@LYRE.MIT.EDU> Date: 18 Jul 88 12:58:01 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 37 Date: Sun, 17 Jul 88 19:52:12 EDT From: sundar@wheaties.ai.mit.edu (Sundar Narasimhan) a. I have an application that has a rather complicated function bound to a command button's callback. Since this function takes a long time, ideally I would like to be able to provide feedback to the user at intermediate points ... Now, the way the toolkit functions are set up, one would have to write one's own XtMainLoop()/select() to do this, am I right? (or is there some other way of intercepting this loop)? In general yes, you will need to include your own XtNextEvent/ XtDispatchEvent code within your compute-bound function if the application is single threaded. For many things, you can get away with merely processing Exposure events using XCheckIfEvent/XtDispatchEvent. Currently, I get to seeing only the last of the update status messages.. XFlush() doesn't help. I don't understand why. If you're not reading events, XFlush is the correct way to make sure new requests are dequeued from the client. b. Regarding translation tables: How does one invoke a function normally in a translation table of a widget from within a program? For example, I would like to scroll a text window's display one page up from within my program. There is at present no way to invoke a widget's Action routines without an input event. Widgets are expected to export public procedures to do this (which will frequently be wrappers around their Actions). I know this is kind of a pain, but people, could everyone garbage collect their mailing lists at least once in a while ... Thanks. Amen.