Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!asuvax!stjhmc!p88.f15.n300.z1.fidonet.org!Lawson.English From: Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) Newsgroups: comp.sys.mac.programmer Subject: Re: What am I doing wrong?--modal dialog use crashes Message-ID: <10970.282FE0A7@stjhmc.fidonet.org> Date: 13 May 91 04:32:16 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:300/15.88 - Tucson Apple Core, Tucson AZ Lines: 26 Bill Hofmann writes in a message to All BH> For the second time this week, if you create a window, you must BH> call SetPort before you use it. Jim Reekes is wrong here, the BH> original poster *does* pass the address of a block of memory BH> big enough to hold a DialogRecord, and does all the right things BH> to get rid of memory. He is right to point out the silliness BH> of calling ShowWindow more than once (or even once, if the DLOG BH> indicates the window should be visible). A not-so-well know bug in the Think Class Libraries requires one to send gDeskTop a Deactivate message before creating and showing a dialog (it must be hidden before it is shown). Otherwise, gDeskTop gets an update event message when the dialog goes away and somehow tries to send its window a deactivate message. As the dialog is NOT part of gDeskTop's window list, and no longer even exists, this causes mucho problemas. I posted a dialog manager class that gets around the problem. Did anyone actually see it, or should I repost? Lawson -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English Internet: Lawson.English@p88.f15.n300.z1.fidonet.org