Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!ranger.enet.dec.com!minow From: minow@ranger.enet.dec.com (Martin Minow) Newsgroups: comp.sys.mac.programmer Subject: PostHighLevelEvent from a completion routine? Message-ID: <23852@shlump.lkg.dec.com> Date: 26 Jun 91 14:06:55 GMT Sender: newsdaemon@shlump.lkg.dec.com Organization: Digital Equipment Corporation Lines: 21 An application I'm working on uses the PPCToolbox to process remote requests. It is currently running as an application (it will become an INIT/CDEV, or maybe a "faceless background procedure" in the future), and all PPC processing runs in completion routines. (See Keith Rollin's INIT - CDEV demo on the System 7 developer's CD Rom for a similar example.) Since the body of the program runs in completion routines, I need a way to send error status and logging information to the main application. However, when I tried to use PostHighLevelEvent from a completion routine, the function returned error -903 (noPortErr). This is not in the expected error list in Inside Mac VI -- and PostHighLevelEvent is not specifically noted as "can/can't call from completion routines." While I can fall back on using shared globals, I'm wondering if there is any better way for a completion routine to send an "event" to an application. Thanks for any suggestions. Martin Minow minow@ranger.enet.dec.com