Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!cs.yale.edu!tarr-michael From: tarr-michael@CS.YALE.EDU (michael tarr) Newsgroups: comp.sys.mac.programmer Subject: Hanging due to repeated modaldialog call Message-ID: <25928@cs.yale.edu> Date: 29 Aug 90 14:09:21 GMT Sender: news@cs.yale.edu Organization: Department of Psychology, Yale University Lines: 38 Nntp-Posting-Host: algeria.ai.cs.yale.edu Any suggestions as to why calling this more than 4 or 5 times with 4 or 5 TE windows open hangs the system (not even a bomb)? #define SAVE_WIDTH 250 #define SAVE_HEIGHT 110 int HandleQuitOrSaveDialog(void) { Handle itemList; DialogPtr saveDialog; Rect boundsRect; int itemHit; SetCursor(&arrow); itemList = GetResource( 'DITL', SAVE_DITL_ID ); SetRect ( &boundsRect, (screenBits.bounds.right - SAVE_WIDTH) / 2, (screenBits.bounds.bottom - SAVE_HEIGHT) / 2, (screenBits.bounds.right + SAVE_WIDTH) / 2, (screenBits.bounds.bottom + SAVE_HEIGHT) / 2 ); saveDialog = NewDialog( NIL_POINTER, &boundsRect, NIL_TITLE, TRUE, dBoxProc, MOVE_TO_FRONT, NO_GO_AWAY, NIL_REF_CON, itemList ); FrameDItem( saveDialog, SAVE_BUTTON ); ModalDialog( NIL_POINTER, &itemHit ); DisposDialog( saveDialog ); ReleaseResource( itemList ); return( itemHit ); } -- * Mike Tarr The Human Neuron Project * * tarr@cs.yale.edu Department of Psychology * * "My opinions are always my own." Yale University * **************************************************************************