Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdcsu.UUCP Path: utzoo!watmath!watdcsu!gross From: gross@watdcsu.UUCP (Evan Gross [Sys Des]) Newsgroups: net.micro.mac Subject: SFGetFile Message-ID: <832@watdcsu.UUCP> Date: Wed, 16-Jan-85 01:59:10 EST Article-I.D.: watdcsu.832 Posted: Wed Jan 16 01:59:10 1985 Date-Received: Wed, 16-Jan-85 05:46:14 EST Distribution: net Organization: U of Waterloo, Ontario Lines: 27 I'm having some problems using a dialog hook procedure with SFGetFile, and am wondering if anyone else out there has encountered something similar. I have also discovered something useful that is undocumented (package manager 2nd draft 5/7/84). The problem (I think it's a bug in SFGetFile): IM says that when a disk inserted event occurs, SFGetFile's filterProc function sends an item number of 100 to your dlgHook function. Well, I have found that it is repeatedly sends 100 to dlgHook, (disk inserted or not) although all other events do come through ok. So, it seems at present there is no way to detect a disk inserted event this way. If and when Apple fixes this problem, I vote for changing the item number for a disk inserted event from 100 to 100 + drive number, in a manner similar to reporting key down events to dlgHook. Sound reasonable? The undocumented feature (not a bug): Just before the SFGetFile dialog box is put up, the dlgHook function is sent an item number -1. This is great if you want to change the title of a control before the dialog box is drawn...say changing the "Open" button to read "Print" or something like that. This allows one to change the appearance of the standard dialog on the fly, without making up a new template and using it instead. (Lots of programs do this...MacTerminal, all the MDS stuff, Consulair C, etc. IM just doesn't tell you how). Evan Gross watmath!watdcsu!gross Rainmaker Research Inc.