Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ames!dftsrv!palantir.gsfc.nasa.gov!rdominy From: rdominy@palantir.gsfc.nasa.gov (Robert Dominy) Newsgroups: comp.sys.mac.programmer Subject: Re: MacApp Question (view resources and PoseModally) Message-ID: <797@dftsrv.gsfc.nasa.gov> Date: 2 Feb 90 19:13:56 GMT References: <131035@sun.Eng.Sun.COM> Sender: news@dftsrv.gsfc.nasa.gov Organization: NASA Goddard Space Flight Center Lines: 25 In article <131035@sun.Eng.Sun.COM> nano%urbina@Sun.COM (Fernando Urbina) writes: > I created a view (fReceiveView) from a 'view' resource. > This view is used as a status window of the communication > that I'm doing through the serial port). I want to update > some static text on the fReceiveView (that is being > PoseModally'd at the time) depending on what the > state of the communication is, i.e. Dialing, logging in, > verifying password, etc. I also would like to have a > cancel button, so that the user could abort the communication > at any time. In essence, what I want to do is perform other > tasks while my view is being PoseModally'd. What's the > right way of doing this? I have two suggestions: 1) Break your connect method into several functions/methods that correspond to the steps of the process of your logging in. 2) Rather than overriding PoseModally, override the dialog's Idle method and do the processing (of connecting) at Idle time. You will probably need a field variable to keep track of your connection state. The main advantage of this is that when the Cancel button is clicked, IT can handle the process of cancelling and you don't have to put a bunch of checks for this event into your code.