[net.micro.mac] Standard File Dialog question

dubois@uwmacc.UUCP (Paul DuBois) (12/31/85)

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