Path: utzoo!attcan!uunet!wuarchive!brutus.cs.uiuc.edu!apple!agate!shelby!unix!stores From: stores@unix.SRI.COM (Matt Mora) Newsgroups: comp.sys.mac.programmer Subject: Re: (Novice) help with Undo function Message-ID: <2664@unix.SRI.COM> Date: 24 Aug 89 16:20:39 GMT References: <22321@andante.UUCP> <30755@ucbvax.BERKELEY.EDU> <34168@apple.Apple.COM> <30803@ucbvax.BERKELEY.EDU> <4796@thor.acc.stolaf.edu> Reply-To: stores@unix.UUCP (Matt Mora) Organization: SRI International, Menlo Park, CA Lines: 73 In article <4796@thor.acc.stolaf.edu> sobiloff@thor.stolaf.edu (Blake Sobiloff) writes: >OK folks, > If my employer had an ounce of pity... well, anyway, I'm *trying* >to write a program in Microsoft's QuickBASIC and I would like to impliment >a simple Undo feature. None of the sample code that comes with QB shows >an Undo implimentation. I thought maybe FracApp would show me, but Undo >seems to be handled by MacApp (gee, if I only had MacApp...). Soooo... > This is the first time I've ever tried to do a Macintosh program, >but I *have* had plenty of experience with Pascal on "simple" platforms >(I'm not an *expert*, mind you, but I know it pretty well). Could someone >give me some Pascal or even pseudocode that would show me how to impliment >a simple Undo? Puh-leease?! Good luck! I've written hundreds of applications In Quick basic and only one of them includes an undo. And its not in the Edit menu :-( The problem is if you write your edit menu to use the undo, you will lose all the editing functions of the stanard edit menu unless you implement them yourself. If you do that you might as well write the program in pascal. In volume 3 of mactutor is an article on imlementing undo for textedit. About your comment on not writing professional programs in basic. Since 1985 I've been writing a complete inventory system in Basic for my employer. The reason is because they tried to do it on a mainframe but it was to slow. I showed them what I've written at home on my mom's 128K mac and we been using this system ever since. The system now includes a network of two mac plus's, two SE's and one Mac II. I'm being payed for writting this system so I guess that makes Basic A Professional Language.:-) Quickbasic now includes a very powerful feature called Pure code resourcests. the othe creates a size menu.(size menu stored as a resource. Also included are the support routines that handle the check marking, Outlining of the installed sizes and return the correct font number. A getresmenu. gets a menu resource. Custom MDEF's. call a Custom MDEF from a resource. One is a Patpallet created on the fly (slow patterns that chage) the other blasts a bitmap of a Pat palette (fast, patterns won't change). Pop up menu's List Manager A complete list manager package. Offscreen Bitmaps Scroll bars Getindpatt get Index pattens from resource. GetModifiers Get the modifier keys (command, option shift) IUdateString.proj IU utilities. PicComments SetEOF zero out files SndPlay play a sound resource EventAvail Gets all the events and lets you decide what to do. The reason I can write hundreds of programs is because I wrote a program called Dialog Maker. It works like prototyper but is much easier to use. It generates QBasic,Zbasic(yuck) and Rmaker code.(resedit files are in the works). Sorry for the rambling but when you need a quick and dirty program with the mac interface QuickBasic is the way to go. -- ___________________________________________________________ Matthew Mora SRI International stores@unix.sri.com ___________________________________________________________