Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Tech Notes Message-ID: <36147@apple.Apple.COM> Date: 2 Nov 89 20:04:10 GMT References: <89290.151118CXT105@PSUVM.BITNET> <5658@ucdavis.ucdavis.edu> <411@iconsys.UUCP> <36098@apple.Apple.COM> <1989Nov2.190025.14568@polyslo.CalPoly.EDU> Organization: Apple Computer Inc, Cupertino, CA Lines: 103 In article <1989Nov2.190025.14568@polyslo.CalPoly.EDU> tdrinkar@cosmos.acs.calpoly.edu.UUCP (Terrell Drinkard) writes: > >New subject: > Can someone out there give me some idea as to the usefullness of >MacApp? I'm not even real sure as to what it is, actually. But it >was noted in my MPW docs and I am interested. Let me put it this way: I won't program without MacApp anymore. And I know that anyone else in DTS who had mastered MacApp and needs to write a real program feels the same way (unless your name is Paul, in which case you'll use ACL). MacApp is an object oriented application framework. It is written in Apple's Object Pascal, but can also be accessed by C++. It gives you the basic frame- work of an application, and allows you to fill in the missing parts. For instance, all you need to do to get a working program that supported a full set of menus, multiple windows, window management, about box, scrollbars, memory management, exception handing, multifinder awareness, etc. is write about 50 lines of source code. Here is a little Nothing program that comes with MacApp that gives you all that I mentioned. Basically, all it does is create an Application object responsible for running your program (from the main event loop on down), and defines a procedure to be called when the window needs to be updated (TDefaultView.Draw): PROGRAM UNothing; USES UMacApp, UPrinting, Fonts; CONST kSignature = 'SS01'; kFileType = 'SF01'; TYPE TNothingApplication = OBJECT (TApplication) PROCEDURE TNothingApplication.INothingApplication(itsMainFileType: OSType); END; TDefaultView = OBJECT (TView) PROCEDURE TDefaultView.Draw(area: Rect); OVERRIDE; END; VAR gNothingApplication: TNothingApplication; PROCEDURE TNothingApplication.INothingApplication(itsMainFileType: OSType); BEGIN IApplication(itsMainFileType); RegisterStdType('TDefaultView', 'dflt'); IF gDeadStripSuppression THEN IF Member(TObject(NIL), TDefaultView) THEN ; END; PROCEDURE TDefaultView.Draw(area: Rect); OVERRIDE; VAR itsQDExtent: Rect; BEGIN PenNormal; PenSize(10, 10); PenPat(dkGray); GetQDExtent(itsQDExtent); FrameRect(itsQDExtent); TextFont(ApplFont); TextSize(72); MoveTo(45, 90); DrawString('MacApp('); PenNormal; END; BEGIN InitToolBox; IF ValidateConfiguration(gConfiguration) THEN BEGIN InitUMacApp(8); InitUPrinting; New(gNothingApplication); FailNIL(gNothingApplication); gNothingApplication.INothingApplication(kFileType); gNothingApplication.Run; END ELSE StdAlert(phUnsupportedConfiguration); END. In addition, MacApp gives you excellent development tools and debugging facilities, including an object inspector, a class browser, a view layout editor, discipline, writeln window, high-level breaks and tracing, performance tools, etc. > And if you don't mind, could someone also explain the benefits >of belonging to APDA? You can buy MacApp... -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions