Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uwvax!astroatc!nicmad!madnix!jason From: jason@madnix.UUCP (Jason Blochowiak) Newsgroups: comp.sys.apple Subject: Sublaunching (was Re: Finder Data File Format) Summary: I dunno if that'd work Keywords: launching, programming, //gs Message-ID: <1113@madnix.UUCP> Date: 15 Feb 90 14:25:49 GMT References: <9001260129.AA04439@apple.com> <38342@apple.Apple.COM> <1214@darkstar.ucsc.edu> Reply-To: jason@madnix.UUCP (Jason Blochowiak) Organization: ARP Software, Madison, WI Lines: 38 Although it'd be nice to be able to launch something without the application knowing about it, I think it'd be kind of dangerous. Reason: There's no simple way (that I'm aware of, anyways, and I _have_ looked into this) to wrap/unwrap an application's context. Things like normal tools should be easy enough (save their WAP), but there are a few wierd tools. The resource mgr is one, but they provided support for context switching. The misc toolset is another - how is it possible to safely wrap all of the heartbeat tasks, for example? It wouldn't even be safe to search through the heartbeat queue and (temporarily) remove all of the entries that are located in an area owned by the application's ID. It's entirely possible that, for example, the thing has loaded a bunch of shell utilities, and _they_ installed some heartbeat tasks. Then, of course, there's GS/OS - the application may have open files, possibly some pending i/o, etc. The point of all of this is that 1) You'd have to do a complete context wrap of the current application to safely launch another one, and 2) Getting the context wrap would be one hell of a trick (and if you did it, writing a Switcher would more likely be a better application of the technology). As usual, I may have missed something really important to all of this... I personally would like one of the "unused" standard toolcalls to be used as a wrap/unwrap. For example: context[windMgr] = WindContext(getContext,nil,id); and then, WindContext(setContext,context[windMgr],0); Where xxxContext would return a new handle containing its context when requested, or set the context based on the contents of a handle. As mentioned above, for most tools, this would just be a matter of sticking the WAP (which stands for Work Area Pointer, btw) into a new handle. All sorts of neat things could then be written, and the writer wouldn't have to worry about future compatibility, as the tools themselves would handle the context wrap/unwrap... -- Jason Blochowiak - jason@madnix.UUCP or, try: astroatc!nicmad!madnix!jason@spool.cs.wisc.edu "Education, like neurosis, begins at home." - Milton R. Saperstein