barnett@cc.ic.ac.uk (G.J. Barnett) (02/03/91)
I hope somebody can help with a problem I have come across. I have an XCMD which calls a modal dialog, gets info from it, removes the dialog, processes data for a bit, and then returns to hypercard. The problem is that after my dialog has been removed, and the grafport set back to hypercard the space where the dialog was stays blank. As the dialog is 2/3 of the screen size it is a real nuisance. Does anyone know if hypercard 1.2.5 (and hypercard 2.0) ignores update screen events when it has handed control to an XCMD, and if so how can you round it ? If anyone has any ideas or mad fantasies please mail me at barnett@cc.ic.ac.uk Thanks for the help in advance, and if I get any joy I'll post the results.
mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) (02/05/91)
In article <1991Feb3.111602.15893@cc.ic.ac.uk> barnett@cc.ic.ac.uk (G.J. Barnett) writes: > > I hope somebody can help with a problem I have come across. I >have an XCMD which calls a modal dialog, gets info from it, removes the >dialog, processes data for a bit, and then returns to hypercard. The >problem is that after my dialog has been removed, and the grafport set >back to hypercard the space where the dialog was stays blank. As the >dialog is 2/3 of the screen size it is a real nuisance. > Does anyone know if hypercard 1.2.5 (and hypercard 2.0) >ignores update screen events when it has handed control to an XCMD, and >if so how can you round it ? > I have noticed that HC 2.0 seems to deal with update events somewhat more frequently than the idle loop; I have a stack that fills in forms, some fields of which utilize modal dialogs. In 1.2.5, I had to trap tabKey and pass control to the nexr field from an idle handler to get the screen to update, but this does not seem necessary in 2.0. I have tried "send idle to HyperCard" from my XCMD, but have gotten in to trouble. This may simply be due to the fact that my XCMD was not completely debugged at the time. Perhaps someone at Apple could enlighten us, but I have come to believe that HyperCard can get quite unhappy if it calls FrontWindow() and things are not as they should be. Jeff E Mandel MD MS Asst Professor of Anesthesiology Tulane University School of Medicine New Orleans, LA
dmittman@beowulf.JPL.NASA.GOV (David Mittman) (02/06/91)
Try surrounding the modal call with lock/unlock screen. This seems to work. - David
gilbert@MDI.COM (John Gilbert) (02/06/91)
In article <5999@rex.cs.tulane.edu> mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) writes: >In article <1991Feb3.111602.15893@cc.ic.ac.uk> barnett@cc.ic.ac.uk (G.J. >Barnett) writes: >> >> Does anyone know if hypercard 1.2.5 (and hypercard 2.0) >>ignores update screen events when it has handed control to an XCMD, and >>if so how can you round it ? >> > > I have noticed that HC 2.0 seems to deal with update events somewhat more >frequently than the idle loop; I have a stack that fills in forms, some fields I too have a question about this. I often use go next/prev buttons in my stack with the following style... on mouseDown repeat while the mouse is stillDown -- may not be exact... go next card -- or prev card, as the case may be... end repeat end mouseDown This allows me to lean on the mouse button until I reach the card I am scanning for. With 2.0, and in some cases in 1.2.5, but not earlier, a simple click on the mouse to go one card is usually lost. I fixed this by adding a 'go next card' before the repeat loop. But now in HC 2.0, it seems to suppress screen painting within a handler/script. If I lean on the mouse, I whizz through cards pretty quickly, but don't see it. I let go and I am way past where I want to be. All I have found to do is stop using the buttons this way, but I miss it. Is there some other way I can do this? Is there a way to force the painting of a card before an event handler is completed? I also have some functions whic scan all cards an do some maintenance. Some of them take a while and used to show me each card as it moved, but this is no longer the case. I am changing some of the scripts to put some kind of progress indicator in the message bos, but in some cases this is less desirable. Thanks for any help.... -- John Gilbert gilbert@MDI.COM ..!uunet!mdisea!gilbert
Roger.W.Brown@dartmouth.edu (Roger W. Brown) (02/07/91)
In article <1991Feb3.111602.15893@cc.ic.ac.uk> barnett@cc.ic.ac.uk (G.J. Barnett) writes: I hope somebody can help with a problem I have come across. I have an XCMD which calls a modal dialog, gets info from it, removes the dialog, processes data for a bit, and then returns to hypercard. The problem is that after my dialog has been removed, and the grafport set back to hypercard the space where the dialog was stays blank... Our standard method for forcing a screen update in such a case is to put go to this card after the XCMD call. HyperCard will clean up the picture right away. --------------------- Roger Brown Coursware Development Roger.W.Brown@dartmouth.edu Dartmouth College