Jim.Lynch@f444.n161.z1.FIDONET.ORG (Jim Lynch) (01/02/91)
> Subj: C++ PROGRAMMING UNDER MPW - ADVICE SOUGHT > From: kt@msor.msor (Keith Tizzard) > Date: 7 Dec 90 17:17:56 GMT > Organization: MSOR Department, Exeter University, UK > Message-ID: <1082@exua.exeter.ac.uk> > Newsgroups: comp.sys.mac.programmer > > I am trying to use C++ under MPW and would welcome some > advice and help. The C++ language creates no problem > since I have used it in other environments. The problem > comes when I try to find out about the MacApp classes and > their methods. > > Where do I look for a clear description? > > Do I need to acquire and read all the volumes of > Inside Macintosh? ******** YES!YES!YES! *********** Actually, I got them one at a time. Start with Vol. I and devour it -- especially the chapters on User Interface Guidelines, Memory Intro and Assembly language. Also, get Vol. II at the same time and read up on the Memory Manager. > Is there a class browser to enable me to find out, quickly > and easily what classes are available to inherit and what > member functions they contain? > > Basically I am comfortable with obejct orientated programming > and C++ but am new to programming the Mac. Any advice about > how to proceed would be most welcome. > > In the APDAlog I note the publications: > > C++ Programming with MacApp by David Wilson, Larry Rosenstein > and Dan Shafer > > Elements of C++ Macintosh Programming by Dan Weston > > Has anybody read and used these? Are they helpful for the novice? > > Let me illustrate my difficulty. > > The following code is taken from ShapesApp.cp, one of > the files in the distributed C++ examples which come > with MPW. Reading the code is difficult and the thought > of creating new code is awe inspiring. Within the class > constructors and member functions very little appears to > be object orientated. > > In the constructor TShapesApp, shown below, are SetMenuBar(), > DisposHandle(), DrawMenuBar() ... external functions (i.e. C) > or are they inherited member functions? Why does it not say: > > menuBar->Set() or maybe menuBar.Set() and > menuBar->DisposeHandle > > /* remainder deleted */ These calls are in the Macintosh ROM which is not object oriented. Having Inside Mac around will help you determine which calls are where. -Jim > > -- > Keith Tizzard > MSOR Dept, University of Exeter, Streatham Court, EXETER EX4 4PU, UK > tel: (+44) 392 264463 email: kt@msor.exeter.ac.uk kt@msor.UUCP > > --- ConfMail V3.3 > * Origin: NCFCC SF, CA / fidogate.fidonet.org (1:125/777) /*********************************************************************/ /* Jim Lynch on BMUG BBS in Berkeley, CA */ /* (415) 849-BMUG */ /* or leave a voice message at: */ /* (415) 521-7367 */ /*********************************************************************/ -- Jim Lynch - via FidoNet node 1:125/777 UUCP: ...!uunet!hoptoad!fidogate!161!444!Jim.Lynch INTERNET: Jim.Lynch@f444.n161.z1.FIDONET.ORG
ml27192@uxa.cso.uiuc.edu (lanett mark) (01/06/91)
Jim.Lynch@f444.n161.z1.FIDONET.ORG (Jim Lynch) writes: >> I am trying to use C++ under MPW and would welcome some >> advice and help. The C++ language creates no problem >> since I have used it in other environments. The problem >> comes when I try to find out about the MacApp classes and >> their methods. >> >> Where do I look for a clear description? >> >> Do I need to acquire and read all the volumes of >> Inside Macintosh? >******** YES!YES!YES! *********** No No No! Inside Mac describes the Toolbox. It _is_ very usefull to have around, but is _not_ a reference for MacApp! The only reference I am aware of for MacApp is the pair of HC stacks: MacApp Reference and Methods. The descriptions are rather useless, though. In fact in all the the MacApp doc's there is really no description concerning the TGridView and its ancestors like TTextListView. You must examine the Calc code and other examples that have font-picker views to determine how they work. I am very disappointed with the quality of the MacApp references in general (as opposed to their tutorial, which _are_ helpfull, if only initially). >> Is there a class browser to enable me to find out, quickly >> and easily what classes are available to inherit and what >> member functions they contain? Yes, it's included. It may be called Mouser or MacBrowse. It is limited in that in cannot create new methods or fields, but is overall a better editing environ than MPW for object oriented source code. You should use it to parse the entire MacApp source, which I've found to be the best way to learn MacApp. First parse (in Pascal) the PInterfaces and then Libraries. Then create a C++ parse for the CInterfaces. (the browser saves method file-location info in "parse" files). >> In the APDAlog I note the publications: >> C++ Programming with MacApp by David Wilson, Larry Rosenstein >> and Dan Shafer >> Elements of C++ Macintosh Programming by Dan Weston I have both but honestly don't use them much. I tend to stick to reference manuals. They make good reading but I wouldn't think of following _their_ tutorials. Just use them for theory. One of these (I forget which) describes MacApp 1.0, and is therefore not good as a reference. Luck! ----------- Mark Lanett