Skip to main content
Home Documents Software Guides Mastering Tcl Errata
Mastering Tcl Errata

Mastering Tcl Errata

Filenamemastering-tcl-errata.txt
Size0.01 MB
Downloads3
Contents
From: Dan Crevier, dan@rhino.harvard.edu Subject: Mastering TCL errata ERRATA FOR MASTERING THE THINK CLASS LIBRARY BOOK (2/24/96) This file contains code that is missing or in error in the book. If you find other errors in the book (other than typos), please EMAIL me what needs to be corrected to one of the following adresses: CompuServe: 76556, 1132 Internet: rparker@s2.sonnet.com (Rich Parker) Several of the code examples in the book are missing #include statements or have other errors that this document addresses. Please make the following corrections or additions to your code. ======================================================================= CHAPTER 3: Managing the Document's Data On page-69, the CApp::DoNewDialog function includes the statement: filetype = CMainFType; This should be changed to read: *filetype = CMainFType; ----- Add the following #include statements at the top of the CApp.cp file, beginning on page-74: #include "CNewFile.h" #include "CMain.h" #include "CNewView.h" Also, in the CApp.h file, change the declaration of the GetDocTypeFromDialog function to read as follows: virtual OSType GetDocTypeFromDialog(CNewFile *dialog); The additions to the CNewView.h header file are not shown in the book. These are as follows: public: virtual void OpenFile(SFReply *macSFReply); protected: virtual void MakeNewWindow (void); ----- Also, the code for the OpenFile member function of the CNewView class wasn't shown in the section dealing with source code additions to the CNewView.cp source file. This function should be added, as follows: void CNewView::OpenFile (SFReply *macSFReply) { // override the immediate base class version of this // function in order to open a file using the version // implemented in the CTextData class. CTextData::OpenFile (macSFReply); } ======================================================================= CHAPTER 4: Creating a Business Account View When creating the NewAccount dialog, the following identifiers were assigned to the various controls in the VA (see pp. 114): Checking button: CheckingRadio Savings button: SavingsRadio Cash button: CashRadio Credit Card button: CreditRadio Asset button: AssetRadio Liability button: LiabilityRadio Account name field: AcctName Info field: InfoText The foregoing are used to generate the names that appear in the enumeration listed on page 133. ----- The code for the CMain::GetAcctSettings and CMain::UpdateMenus functions is not provided in the book. It is as follows: void CMain::GetAcctSettings (Boolean fromDocument, CNewAccountData *data) { if (fromDocument) { *data = itsAcctData; } else { itsAcctData = *data; } } void CMain::UpdateMenus() { Cell curCell = {0, 0}; long nextAccount = ((CApp *)gApplication)->theNextAccount; x_CMain::UpdateMenus(); …

Showing first 3,000 characters of 7,840 total. Open the full document →

MacTrove — a free archive of classic Macintosh software. Files mirrored from ftp.funet.fi/pub/mac (info-mac + funet legacy). All software provided for historical preservation.