Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: MacApp model dialogs (was Re: Scrolling lists in dialogs) Keywords: modal dialogs, alerts, centre, center Message-ID: <22238@well.sf.ca.us> Date: 19 Dec 90 03:50:26 GMT References: <2896@ux.acs.umn.edu> <1990Dec14.165910.27928@actrix.gen.nz> <458@spam.ua.oz> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 25 In article <458@spam.ua.oz> jnixon@spam.ua.oz (John Nixon) writes: >I have just started programming the Mac (IIcx, Think Pascal 3.0), and like >the idea of using StopAlerts et al. I've given up on all the ...Alert() calls in all my commercial code. Consider: 1.) they are hard to center (remember to center o ver the current document, which might be on another CRT, not just center on the main screen.) 2.) They are hard to parameterize. You just about have to use ParamString(), and if you have a pattern like "Save ^0 befoere closing?" and the user happens to name his file "^0". ParamString() will inifinite loop, crashing the machine. Also, if you make the Edittext box big enough for the largest possible filename, then it looks funky: too much white space on normal files. Modern programs disable the menu bar during editText-less modal dialgos, anfd pass update events/deactivate events to windows behind the alert. All possible from a filter function, but tedious. Instead, I wrote a package thaty looks like an alert, but has the behavior I want, including auto-sizing the dialog to like nice for the amount of text in it. -- -- David Phillip Oster - At least the government doesn't make death worse. -- oster@well.sf.ca.us = {backbone}!well!oster