Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!cwjcc!gatech!udel!rochester!uhura.cc.rochester.edu!joker!mcli From: mcli@joker (Maurice Ling) Newsgroups: comp.sys.mac.programmer Subject: SFPPutFile(), SFPGet() problem Keywords: dialog hook problem, THINK's LSC 3.0 Message-ID: <2548@ur-cc.UUCP> Date: 21 Jul 89 20:42:13 GMT Sender: news@uhura.cc.rochester.edu Reply-To: mcli@joker (Maurice Ling) Organization: The Institute of Optics, University of Rochester Lines: 51 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 /\