Mark.Saltzman@samba.acs.unc.edu (BBS Account) (08/29/90)
When I use modal dialogs in Think C within the TCL starter project, I always get and odd adress error somewhere inside the oops library if I dont dispose of the dialog with DisposDialog. When I do Dispose of it, everything works fine. But it seems that I should only have to load the dialog once during my document initialization, use it as many times as I want using Show window to activate it, and then dispose of it when the document is disposed. Is this a ridiculous assumption? Am I doing something wrong? thanks in advance, Mark Saltzman ak751@cleveland.freenet.edu
anderson@Apple.COM (Clark Anderson) (08/29/90)
From: Mark.Saltzman@samba.acs.unc.edu (BBS Account) Subject: TCL problem with modal dialogs >When I use modal dialogs in Think C within the TCL starter project, I >always get and odd adress error somewhere inside the oops library if I dont >dispose of the dialog with DisposDialog. When I do Dispose of it, everything >works fine. But it seems that I should only have to load the dialog once >during my document initialization, use it as many times as I want using >Show window to activate it... Well, not really. If you wanted to do it that way (and do it right), you'd have to build all the dialogs yourself, using the TCL windowing routines, and re-implement the Modal Dialog routine, and write all the code to handle where the user clicks, etc. From my experience, it'd be more of a pain than it's worth, but you could do it. If you want to use dialogs that are resource-resident and use GetNewDialog and Modal Dialog with them, you have to call Dispose Dialog after you're done with it. No big deal. TCL can't handle the windows that the dialogs are in, because they're not of type CWindow, etc. The best way (for me, anyway) is to call GetNewDialog, Modal Dialog, do whatever has to be done, and blow the dialog away with DisposeDialog. Modeless dialogs, on the other hand, might be worth doing using the TCL routines. (Just my humble opinion) --clark -- ----------------------------------------------------------- Clark Anderson InterNet: anderson@apple.com PCB Software Tools AppleLink: C.ANDERSON Apple Computer, Inc BellNet: 408-974-4593 "I speak only for myself, much to my employer's relief..." -----------------------------------------------------------