Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!portal!sv!news From: leonardr@svc.portal.com (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: Sublaunching ??? Message-ID: <1990Dec13.051911.28265@svc.portal.com> Date: 13 Dec 90 05:19:11 GMT References: <1990Dec11.004705.20759@dhw68k.cts.com> <1990Dec12.155057.5967@eng.umd.edu> <1990Dec12.193848.14629@engin.umich.edu> Sender: news@svc.portal.com Reply-To: leonardr@svc.portal.com (Leonard Rosenthol) Organization: Software Ventures Corporation. Lines: 31 In article <1990Dec12.193848.14629@engin.umich.edu>, mystone@mondo.engin.umich.edu (Dean Yu) writes: > When you double-click on a document in the Finder and the application which > created that document is already running, MultiFinder switches it into the > foreground. MultiFinder then searches your menus for an Open item in the > File menu. If you don't have an Open in the standard place, MultiFinder > looks for 'mstr' and 'mst#' resources in the application to tell it where the > Open item is. > Once it finds that item, it calculates where on the screen that item would > be if the menu were pulled down. It posts a mouseDown event in the menu bar > over the menu title, and a mouseUp event over the menu item. A patch on > _MenuSelect is installed so you don't see the menu pop down briefly. > A patch is also installed on _Pack3 (Standard File). This patch doesn't > bring up the Standard File dialog, but simply returns an SFReply record > containing information for the document you double clicked on in the Finder. > That's all there is to it! > Since I have never seen the MF code, I can't say whether you are completely correct, Dean, but I do know that when I have reimplemented this for a 'launching utility', I didn't bother with the item location. Due to the presence of the _MenuSelect patch, you only need to post the mouseDown into the menu bar, causing the app to call MenuSelect, and then your patch can just return whatever it wants - no need for the item calculation! The _Pack3 patch does indeed work as noted. -- ---------------------------------------------------------------------- + Leonard Rosenthol | Internet: leonardr@sv.portal.com + + Software Ventures | GEnie: MACgician + + MicroPhone II Development Team | AOL: MACgician1 + ----------------------------------------------------------------------