Newsgroups: comp.sys.mac.programmer Path: utzoo!utgpu!news-server.csri.toronto.edu!cressy!mts From: mts@cressy.uucp (Martin Stanley) Subject: `co-routine' 2 (or more) applications? Organization: Digital Access Date: Sun, 23 Jun 91 00:45:49 GMT Message-ID: <1991Jun23.004549.11848@cressy.uucp> I want to run two applications simultaneously and would like the user feel like he/she is using one integrated application. In particular, I am using MCL (Lisp) and HyperCard (2.1) and communicating via AppleEvents. There are certain things that are more appropriately done by the Lisp end and others by HyperCard, but I need both on the screen at the same time. The idea is that the user could click on whichever window and be interacting with that application. Is there a way to trap all mouse clicks and then switch applications as necessary and also react to the mouse click in the `switched-to' application? I assume that one needs to modify the main event loop of each application, but as I understand things, the Finder (MultiFinder) will simply switch applications and the mouse click event will not be seen by the newly (re-)started application. Another potential glitch is how to get the menubar to look and act the same while either application is in control. Any advice/suggestions would be greatly appreciated. Thanks in advance. Martin ------------------------------------------------------------------------------- Martin Stanley Department of Computer Science mts@ai.toronto.edu -or- University of Toronto mts@ai.utoronto.ca Kings College Circle Toronto, Ontario -------------------------------------------------------------------------------