Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!bloom-beacon!apple!goldman From: goldman@Apple.COM (Phil Goldman) Newsgroups: comp.sys.mac.programmer Subject: Re: Forced Switching under MF Keywords: Multifinder Message-ID: <447@internal.Apple.COM> Date: 20 Jan 89 04:00:21 GMT References: <10884@umn-cs.CS.UMN.EDU> <1020@husc6.harvard.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 21 In article <1020@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes: >In article <10884@umn-cs.CS.UMN.EDU> jayrajan@umn-cs.CS.UMN.EDU (Vijay Rajan) writes: > >> Does anybody know of a way to do this "forced" switching? LSC does it > > You can switch to any other opened application by calling OpenDeskAcc() >with the application's name. > > [Think about this for a minute, and you'll understand why it works. > Neat, eh?] This will work fine, but a better method is to simply call _Launch on the target application. If it is running it will be switched to. If not, it will launch it and then switch. The only caveat to this is that it is not supported in MF 1.0, so yo might want to use the _OpenDeskAcc method if you need to be compatible with System 5.0. -Phil Goldman Apple Computer