Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu From: awessels@ccwf.cc.utexas.edu (Allen Wessels) Newsgroups: comp.sys.mac.apps Subject: Re: QuickBasic Window Refresh - Method? Keywords: QuickBasic, Basic, Refresh Message-ID: <39871@ut-emx.uucp> Date: 17 Nov 90 05:25:58 GMT References: <5339@blue.UUCP> Sender: news@ut-emx.uucp Reply-To: awessels@ccwf.cc.utexas.edu (Allen Wessels) Distribution: comp Organization: The University of Texas at Austin Lines: 43 In article <5339@blue.UUCP> linneweh@motcid.UUCP (Louis Linneweh) writes: >I use Microsoft's QuickBasic language for quick, individual programs with >old-fashioned, scrolling, cheap and dirty output. Just the kind of thing >a language named "QuickBasic" should be good at. But the output window is >frequently overwritten by other windows (Mail, Smart Alarms, even QuickBasic >error messages!) and when you return to the output window, low an behold, >the overwritten portion is not refreshed. Not only is work lost, but if >the culprit was the error message you've also lost the details of the >results preceeding the error! Writing code to redo the work and display it >again would not even be able to help this last example, and the amount of >effort required flies in the face of *QuickBasic*. If you store the results of the calculations, you won't lose them. Your best bet is to trap the errors with the ON ERROR statement. Quick is a relative term. I've used QuickBASIC to do lots of quick and dirty programs and it suits my purposes just fine. If you can't design your program within the QuickBASIC/Mac framework, I'd suggest either printing out your intermediate results, or look at a different programming environment. You might look at HyperCard. >Am I just missing an option somewhere that would make "refresh" automatic, Nope, it isn't there. >or am I the victim of Microsoft's desire to give the user full control >over the Mac window interface? I'd even add a little code to trigger a >refresh if I didn't have to redo the entire calculation (which may have >taken some minutes in the first place). Is there a reasonable way to do >this? Do I need to maintain my own scrolling buffer and reprint it? Assuming you have stored the results of your calculations and trap errors, it is pretty easy to check to see if the window has been overwritten and have the program redraw it. I don't have my manual handy and I haven't written the code to do this often enough to post an example. There should be enough leads in the section that talks about handling windows to track this down easily. >BTW, Microsoft couldn't seem to help me with this. It may be *the* reason >to find another language! You might check out ZBASIC, and you might also try and find a copy of the current MacWEEK or InfoWorld. There is an article in one of these (MacWEEK, I think) that describes a new magazine for BASIC users on the Mac.