Easy Object Programming 1993
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
Easy Object Programming for the Macintosh Using AppMaker™ and THINK C™ DISK INCLUDED Superclass Subclass Richard O. Parker
A book cover with a light blue background, large blue and red title text, a white framed diagram of colored ovals (red, orange, blue) connected by arrows labeled Superclass and Subclass, a small disk icon with 'DISK INCLUDED' at top right, and the author name at the bottom.
Reading notes: Trademark symbols (™) after AppMaker and THINK C are small and superscripted; transcribed as shown.
- Languages
- English
PDF page 1
Programming for the Macintosh Using AppMaker™ and THINK C™
• • __ Ea _SY- Object DISKINCWDED Programming_ for the Macintosh Using AppMaker™ and THINK C™ Richard 0. Parker
Reading notes: Transcript intentionally left empty per instructions; the supplied copy was used for other fields only. Header fragments '• • __ Ea _SY- Object DISKINCWDED' are garbled and unclear; the stamp-like word appears to be a damaged or partial rendering and was not interpreted. The title block was split across lines in the supplied copy; AppMaker™ and THINK C™ are named in the title but are not clearly advertised products, so productNames was left empty. The author name is given as 'Richard 0. Parker' and the letter after 'Richard' may be a zero or capital O; the spelling is uncertain. No prices or dates are visible in the supplied copy.
- Languages
- English
PDF page 2
Easy Object Programming For the Macintosh Using TM TM AppMaker and THINK C· Richard 0. Parker PRENTICE HALL, Englewood Cliffs, New Jersey 07632
Reading notes: Visual artwork and layout were not assessed; the description is based only on the supplied source text. The 'TM' marks beside AppMaker and THINK C are ambiguous in the supplied copy and may be trademark symbols. The author's middle initial 'O.' is rendered as '0.' in the supplied copy and may be an OCR misreading. The 'C·' following THINK C includes a stray dot that may be a typographic mark. The publisher line includes the ZIP code 07632, which is listed as printed copy but was not verified against the image.
- Printed product names
- AppMaker · THINK C
- Languages
- English
PDF page 3
Library of Congress Clltalog1ng-1n-Pub11cat1on Data Parker, R1chard 0. Easy Object programm1ng for the Mac1ntosh us1ng AppMaker and THINK c I R1chard o. Parker. p. cm. Includes 1ndex. ISBN 0-13-092966-2 1. Mac1ntosh <Computer>--Programm1ng. 2. ObJect-or1ented programm1ng <Computer sc1ence> 3. AppMaker <Computer f11e> 4. THINK C <Computer f11el I. T1tle. QA76.8.M3P35 1993 005.265--dc20 92-38625 Publisher: Alan Apt Production Editor: Bayani Mendoza de Leon Copy Editor: Brtan Baker Cover Designer: Bruce Kenselaar Prepress Buyer: Unda Behrens Manufacturing Buyer: Dave Dickey Editorial Assistant: Shirley McGuire © 1993 by Prentice-Hall, Inc. A Simon & Schuster Company Englewood Cliffs, New Jersey 07632 CIP The author and publisher of this book have used their best efforts 1n preparing this book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The author and publisher shall not be liable 1n any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance. or use of these programs. All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ISBN 0-13-092966-2 Prentice-Hall International (UK) Umited, London Prentice-Hall of Australia pty. Limited, Sydney Prentice-Hall Canada, Inc .• Toronto Prentice-Hall Hispanoamericana, S.A, Mexico Prentice-Hall of India Private Umited, New Delhi Prentice-Hall of Japan, Inc .• Tokyo Simon & Schuster Asia Pte. Ltd, Singapore Editora Prentice-Hall do Brasil, Ltda .• Rio de Janeiro
Reading notes: OCR character substitutions such as '1' for 'i' and '0' for 'o' appear throughout the copyright block, e.g. 'R1chard', 'Mac1ntosh'. The date '92-38625' appears to be a Library of Congress control number rather than a publication date and may be misread. Reading order of the publisher credits and CIP block is ambiguous due to column extraction.
- Printed product names
- AppMaker · THINK C
- Printed dates
- 1993 · 92-38625
- Languages
- English
PDF page 4
This book is dedicated to my mother. Throughout its creation she constantly encouraged me to keep on writing, even when I was fighting bugs in the code or suffering for lack of the right words to describe the development process. She is a remarkable woman, a gifted artist in her own right and one who has lived from before the dawn of the 20th century to see and experience all the new technology leading to what this book describes. May God grant her the gift of seeing the dawn of the 21st century as well.
- Printed dates
- 20th century · 21st century
- Languages
- English
PDF page 5
Contents Preface .. .... ..... .... ... ... ... ... ... ... .. ... ..... ... .. ... ... ..... ... ... ... ... ... .. .... .. ... .... .. ... ... .. .... .. . xvii Acknowledginents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . . . . .. . . . . . . . . . . xx Chapter 1 Introducing the Tools . ... ... .... .. ... .. ... ... ... .. ... ... .. ... ... ... .. ... ... ... ... ..... .... ... ... .. ...... 1 Chapter 2 Creating a New Resource File with App Maker............................... 3 Creating the Think C Project . . . .. . . . . .. . . . .. . .. . . . .. . . . . . . . .. . . . .. . . . . . . . . . . . . . . . . 12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Examining Ensemble's Structure .............................................................. 21 Ensemble's Classes and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . .. . .. . . . .. 23 CApplication's Initialization Method.................................... 25 CApplication's Run Method ................................................. 28 Processing Events............................................................... 30 Handling the DoCommand (cmdNew) Message.................... 32 Examining the Chain of Command . . . .. . . . . . . . . . . . . .. .. . .. . .. . . . . .. . . .. 36 Examining Event Handling................................................. 40 Summary of Ensemble's Structure and Capabilities............ 44 Exercises .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 v
Reading notes: Table of contents contains OCR artifacts such as dotted leaders and a misspelled 'Acknowledginents'
- Printed product names
- Think C
- Languages
- English
PDF page 6
vi >Contents Chapter 3 Creating the Ensemble Application.......................................................... 4 7 Chapter 4 Adding Text-editing Features to Ensemble.................................. 4 7 Using AppMaker to Enhance the MainWindow.................... 48 Adding a New Menu to Ensemble........................................ 52 Adding a New Menu Bar and Font Menu to Ensemble......... 54 Adding a Dialog Box to Ensemble .. .... .... .. . .. .... ..... .. .... . .. .. .... 56 Compiling the Generated Code .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . 63 Exercises . .. . . . . . . . . . .. . .. .. . .. . . . .. . .. . .. .. . .. . .. . .. . . . . .. . . . . .. . . . . .. . . .. . . .. . .. . .. .. . . .. . 64 Examining the EditTex:t Code .. .. .. .. .. .. .. .... .... .. .... .. ... .. ... .. .. .. .. .. .... ... ... .. .. .. ... 67 The EditText Code Structure .. .. .. .. . .. . .. . .. . .. .. .. .. .. .. .. . .. .. .. .. .. .. .. .. . .. .. 68 Newly Generated Code in ZEnsembleApp.... ... .... .. . .. .. .. .. .. . .. . 69 SetUpMenus Method Code, 69 Newly Generated Code in ZEnsembleDoc .. .... .. .. . .. . .. .. . .... .. ... 70 Newly Generated Code in ZMainWindow ............................. 71 Newly Generated Code in ZNotebook................................... 72 IZNotebook Method Code, 72 NewList25 Method Code, 76 NewList29 Method Code, 77 UpdateMenus Method Code, 77 Newly Generated Code in CNotebook .. .... .. .. . .. . .. .. .. .. .. . .. .. .. .. . 77 DoNotebook Function Code, 78 !Notebook Method Code, 79 CList25 IViewTemp Method Code, 79 CList25 GetCellText Method Code, 80 CNotebook NewList25 Method Code, 81 CList29 Class Methods, 81 CNotebook UpdateMenus Method Code, 82 CNotebook DoCommand Method Code, 82 CNotebook ProviderChanged Method Code, 83
Reading notes: Table of contents with dotted leaders; page numbers and some entries are garbled (e.g. 'EditTex:t', '!Notebook', 'IZNotebook') and reading order is uncertain.
- Languages
- English
PDF page 7
vii Recap of the Generated Code . . . . . . .. . . . .. .. . .. . .. . . . . . . . . . . . .. . . . . . . . . . . . . 86 Exercises .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 86 Chapter 5 Customizing the EditText Code................................................................ 89 Chapter 6 Customizing Methodology........................................................... 90 Customizing the CEnsembleApp Methods................................... 91 Implementing the File Menu Commands ...... .. . ... . . . . . . . . .. .. . . . . . .. .. . .. 92 CreateDocument Method Code, 94 OpenDocument Method Code, 97 DoSave Method Code, 100 SaveAs Method Code, 102 Revert Method Code, 104 Adding Methods to the CMainWindow Class............................. 106 Implementing the Format Notebook Command......................... 107 Initial DoNotebook Code, 112 Sizing the Font Name List, 114 Initializing the Font Names, 115 Sizing the Font Size List, 115 Initializing the Font Size List, 116 Continuing the DoNotebook Code's Initialization, 116 Creating and Operating the Dialog, 11 7 Handling User Interaction, 118 Retrieving the Modified Dialog Values, 124 Disposing of the Dialog and Handling Failures, 124 Exercises................................................................................. 125 Adding a Worksheet Window .................................................................... 127 Creating a New Window for Ensemble ........ ... . ... ... ..... ............... 128 Beginning Construction of the CalcWindow....................... 131 Generating Code for the CalcWindow Addition to Ensemble ..... .
Reading notes: Table of contents with dotted leaders and page numbers; no product, price, or date content present. Heavy OCR-style spacing and punctuation artifacts in chapter and section listings.
- Languages
- English
PDF page 8
viii :>-Contents 145 Changing the CalcWindow Resource Parameters............... 150 Exercises . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Chapter 7 Examining the CalcWindow Code . .. ......................... ... ... .. .... ..... .............. 167 Chapter 8 The CalcWindow's Code Structure............................................ 168 Newly Generated Code in ZEnsembleDoc . . . . . . . . .. . . . . . . .. . .. . . . .. 170 BuildWindows Method Code, 170 Newly Generated Code in ZCalcWindow . . . . . . . . . . .. . . . . . . .. . . . . . . .. 170 IZCalcWindow Method Code, 171 NewListi Method Code, 172 NewUseri Method Code, 173 UpdateMenus Method Code, 174 DoCommand Method Code, 174 Newly Generated Code in CCalcWindow.......... .. . . ... . . . . .. . . . .. 174 ICalcWindow Method Code, 175 Listi IViewTemp Method Code, 175 List GetCellText Method Code, 176 List NewLis~ Method Code, 176 User IViewTemp Method Code, 178 User Draw Method Code, 178 User NewUser 1 Method Code, 179 UpdateMenus Method Code, 180 DoCommand Method Code, 180 ProviderChanged Method Code, 182 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . 183 Customizing the Worksheet Code ........................................................... 185 Customizing the CEnsembleData Code..................................... 186 Modifying the Initialization code........................................ 186
Reading notes: Source is a table of contents with dotted leaders and page numbers; no advertised products or prices present. Some characters in the chapter titles appear garbled (e.g., 'Listi', 'NewUser 1', 'CCalcWindow').
- Languages
- English
PDF page 9
ix IEnsembleData Code, 186 Modifying the Input/Output Code..................................... 187 ReadData Method Code, 187 ReadWSEntries Method Code, 190 WriteData Method Code, 192 WriteWSEntries Method Code, 195 DisposeData Method Code, 196 Adding a New Access Method............................................ 196 GetCluster Method Code, 196 Summary: Customizing CEnsembleData........................... 197 Customizing the CCalcWindow Code . . . . . .. . .. . . . . . . . .. . .. . . . .. . . . . . . . . . . . . . 197 Customizing the Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . 198 CList5 IViewTemp Method Code, 199 CList5 GetCellText Method Code, 200 CList5 DrawCell Method Code, 201 CListl 0 IViewTemp Method Code, 202 CListlO GetCellText Method Code, 202 CList 10 DrawCell Method Code, 203 CListl 5 IViewTemp Method Code, 203 CListl5 GetCellText Method Code, 204 CListl 5 GetContents Method Code, 208 CListl 5 SetLists Method Code, 209 CListl 5 SetCluster Method Code, 209 CList15 SetArray Method Code, 210 CListl5 ProviderChanged Method Code, 211 CList15 Scroll Method Code, 212 Customizing the CCalcWindow Code ................................. 212 Defining a Cell's Contents, 213 The Customized Methods, 214 ICalcWindow Method Code, 215 UpdateMenus Method Code, 216 ProviderChanged Method Code, 217 DoEnterButton Method Code, 219 DoCancelButton Method Code, 220
Reading notes: Table-of-contents line numbers are split by OCR spacing, e.g. 'CList 10' and 'CListl 5', which may reflect OCR artifacts rather than exact printed names.
- Languages
- English
PDF page 10
x >Contents Chapter 9 ParseEntry Method Code, 221 GetExpression Method Code, 224 GetToken Method Code, 228 isConst Method Code, 231 isCell Method Code, 236 MakeStringObj Method Code, 237 MakeValueObj Method Code, 238 Activate Method Code, 239 Adding the CWSEntryClass and Methods.......................... 239 lWSEntry Method Code, 240 CWSEntry Get Access Method Code, 241 CWSEntry Set Access Method Code, 241 Viewing the Customized Results............................................... 242 Exercises................................................................................. 242 Adding a Format Worksheet Dialog........................................................ 24 7 Creating the Worksheet Dialog................................................. 247 Creating the Worksheet Menu Item.......................................... 256 Generating the Format Worksheet Code................................... 257 Exercises ................................................................................... 263 Chapter 10 Examining the Format Worksheet Code ................................................ 265 The New Ensemble Application Structure................................. 266 Examining the ZEnsembleDoc Code Changes........................... 267 Examining the Generated Code for ZWorksheet... .... ... .... ... . .. .. .. 269 Examining the Code for the Worksheet Subclass...................... 274 Exercises . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 282
Reading notes: Table of contents page; no advertised products, prices, or dates present Some page numbers in the table of contents appear garbled by spacing (e.g., 'lWSEntry', 'ZEnsembleDoc' entries)
- Languages
- English
PDF page 11
xi Chapter 11 Customizing the Format Worksheet Code ............................................ 285 Adding a CCellData Class......................................................... 286 Customizing the CEnsembleData Code..................................... 288 Modifying the Initialization Code....................................... 288 IEnsembleData Method Code, 289 Modifying the Input I Output Code . . . . . . . . . . . . . . . . . . . . .. . .. . . .. . . . . . . . 289 WriteData Method Code, 290 WriteStyles Method Code, 292 WriteWSEntries Method Code, 293 ReadData Method Code, 294 ReadStyles Method Code, 295 ReadWSEntries Method Code, 296 DisposeData Method Code, 298 GetHList and GetVList Methods, 299 Customizing the CWorksheet Code ................................... 299 DoWorksheet Function Code, 300 !Worksheet Method Code, 303 DoCommand Method Code, 305 ProviderChanged Method Code, 308 DrawSample Method Code, 311 CellToString Method Code, 312 GetSettings Method Code, 313 CList24 IView'femp and GetCellText Methods, 316 CList28 IView'femp and GetCellText Methods, 31 7 Customizing the CCalcWindow Code ........................................ 318 Customizing the Lists....................................................... 318 CListlO DrawCell Method Code, 319 CListl5 GetCellText Method Code, 319 CList15 DrawCell Method Code, 321 CListl5 GetCellStyle Method Code, 322 CListl 5 DrawWSCell Method Code, 323 CListl5 SetStyleLists Method Code, 326 Customizing the CCalcWindow Methods . . . . . .. . .. . . .. . . . .. . . . . . . . . 326
Reading notes: Table of contents with dotted leaders; some page numbers and characters are garbled or run together, e.g. 'CList24 IView'femp' and 'CList28 IView'femp'. Heading-like lines such as 'IEnsembleData Method Code' and 'CListlO' contain possible OCR errors that cannot be confirmed.
- Languages
- English