Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site uwmacc.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!uwvax!uwmacc!dubois From: dubois@uwmacc.UUCP (Paul DuBois) Newsgroups: net.micro.mac Subject: Standard File Dialog question Message-ID: <1869@uwmacc.UUCP> Date: Mon, 30-Dec-85 16:16:10 EST Article-I.D.: uwmacc.1869 Posted: Mon Dec 30 16:16:10 1985 Date-Received: Wed, 1-Jan-86 00:51:58 EST Distribution: net Organization: Historical Innovations Lines: 35 I want to use SFGetFile in a slightly modified way. In the phonebook Inside Mac, there is a description of the items associated with the dialog box for this procedure. One of these items is a button that's way off the screen, and, presumably, could be moved into the dialog window, retitled and used to good purpose (e.g., made into a "New" button, in case the user wants to select, not one of the files in the scrollable list, but a new entity of whatever type of thing the files in the list represent). IM says that if I supply a dialog hook function, I can process items in a non-standard manner. The procedure header is PROCEDURE SFGetFile (where: Point; prompt: Str255; fileFilter: ProcPtr; numtypes: INTEGER; typeList: SFTypeList; dlgHook: ProcPtr; VAR reply: SFReply); so if I pass a non-nil value for dlgHook, it will use that function. IM says that the dlgHook should look like this: FUNCTION MyDlg (item: INTEGER; theDialog: DialogPtr): INTEGER; and that the standard file stuff will pass this function the number of the item that was last hit, and a pointer to the dialog it's associated with. I tried it. It bombed. Is IM wrong here as it is in other places? Someone on the net must have done this successfully. If you have would you send me a working code fragment? (Any language.) -- | Paul DuBois {allegra,ihnp4,seismo}!uwvax!uwmacc!dubois --+-- | "...and on the eighth day shall be a sabbath." | Leviticus 23:39