mcli@joker (Maurice Ling) (07/22/89)
Hello all, I'm trying to use SFPPutFile() and SFPGetFile() to put up some custom file dialogs. I placed in the dialog box two additional radio buttons. For SFPPutFile(), the Item numbers are 9 and 10, and SFPGetFile(), the item numbers are 12 and 13 (I think). Anyways, I created my own DLOGs in the resource file. The problem is I can not figure out how to use the dialog hook function. Right now, if I put 0L for the dialog hook function, then I get the dialog on my screen, but I can not access the buttons. When I try using a dialog hook function, the debugger gives me an "odd address" error. This is how I'm using it: SaveData() { static Point dlgOrigin = {DlgLeft, DlgTop}; SFReply theReply; FInfo theInfo; int theFile, dummy, ItemType; int ItemNo; OSErr resultCode; Rect DisplayRect; ProcPtr dlgHook; int SaveDataToggle(); dlgHook = SaveDataToggle; SFPPutFile(dlgOrigin, "\pSaveData in which file?", Datafile, dlgHook, &theReply, savedataID, 0L); if (theReply.good) { ..... } .... } int SaveDataToggle(ItemNo, Dialog) int ItemNo; DialogPtr Dialog; { .... (stuff to toggle the radio control buttons) return(ItemNo); } Is this the correct way to use the dialog hook function? Thanks for any advice! Maurice * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** BITNET : MCLI_SS@UORDBV \/ UUCP : ...rochester!uhura!mcli >--< ====================== Internet: mcli@joker.optics.rochester.edu /\