CodeWarrior Software Development Using PowerPlant
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
CodeWarrior™ Software Development Using PowerPlant™ CD-ROM INCLUDED CodeWarrior LITE INSIDE metrowerks Jan L. Harrington
A book cover with a chrome-styled CODEWARRIOR title above orange sans-serif subtitle text on a brick wall background, with a doorway opening onto a sunset sky, a CD-ROM badge at right, and a CodeWarrior LITE and Metrowerks logo block plus an AP Professional logo at bottom.
Reading notes: Small logo text such as 'metrowerks' and 'AP PROFESSIONAL' is low resolution and may be imperfect. Chrome title letters are stylized; spelling as 'CodeWarrior' is read from the stylized display.
- Printed product names
- CodeWarrior · CodeWarrior LITE
- Languages
- English
PDF page 1
CodeWarrior™ Software Development Using PowerPlant™ CD-ROM INCLUDED CodeWarrior Metrowerks LITE INSIDE Jan L. Harrington AP Professional
A book cover with a metallic chrome CodeWarrior logo above orange title text over a brick wall backdrop, with an open doorway revealing a sunset sky with orange clouds, a CD-ROM Included badge, and an AP Professional logo.
Reading notes: Small badge text such as Metrowerks and AP Professional is small and was read from the image; reading order follows the visual layout.
- Printed product names
- CodeWarrior
- Languages
- English
PDF page 2
CODEWARRIOR™ Software Development using PowerPlant ™
A plain white title page with large bold gray-shadowed stylized text reading CodeWarrior with a trademark symbol, followed by smaller italic lines reading Software Development, using, and PowerPlant with a trademark symbol.
Reading notes: The trademark symbols are rendered as superscript TM and may be slightly ambiguous in placement.
- Printed product names
- PowerPlant
- Languages
- English
PDF page 3
LIMITED WARRANTY AND DISCLAIMER OF LIABILITY
LIMITED WARRANTY AND DISCLAIMER OF LIABILITY ACADEMIC PRESS, INC. ("AP") AND ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION OR PRODUCTION OF THE ACCOMPANYING CODE ("THE PRODUCT") CANNOT AND DO NOT WARRANT THE PERFORMANCE OR RESULTS THAT MAY BE OBTAINED BY USING THE PRODUCT. THE PRODUCT IS SOLD "AS IS" WITHOUT WARRANTY OFANY KIND (EXCEPT AS HEREAFTER DESCRIBED), EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF PERFORMANCE OR ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. AP WARRANTS ONLY THAT THE MAGNETIC DISC(S) ON WHICH THE CODE IS RECORDED IS FREE FROM DEFECTS IN MATERIAL AND FAULTY WORKMANSHIP UNDER THE NORMAL USE AND SERVICE FOR A PERIOD OF NINETY (90) DAYS FROM THE DATE THE PRODUCT IS DELIVERED. THE PURCHASER'S SOLE AND EXCLUSIVE REMEDY IN THE EVENT OF A DEFECT IS EXPRESSLY LIMITED TO EITHER REPLACEMENT OF THE DISC(S) OR REFUND OF THE PURCHASE PRICE, AT AP'S SOLE DISCRETION. IN NO EVENT, WHETHER AS A RESULT OF BREACH OF CONTRACT, WARRANTY OR TORT (INCLUDING NEGLIGENCE) WILL AP OR ANYONE WHO HAS BEEN INVOLVED IN THE CREATION OR PRODUCTION OF THE PRODUCT BE LIABLE TO PURCHASER FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE PRODUCT OR ANY MODIFICATIONS THEREOF, OR DUE TO THE CONTENTS OF THE CODE, EVEN IF AP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR ANY CLAIM BY ANY OTHER PARTY. Any request for replacement of a defective CD-ROM disc must be postage prepaid and must be accompanied by the original defective disc, your mailing address and telephone number, and proof of date of purchase and purchase price. Send such requests, stating the nature of the problem, to Academic Press Customer Service, 6277 Sea Harbor Drive, Orlando, FL 32887, 1-800-321-5068. APP shall have no obligation to refund the purchase price or to replace a disc based on the claims of defects in the nature or operation of the Product. Some states do not allow limitation on how long an implied warranty lasts, nor exclusions or limitatiions of incidental or consequential damage, so the above limitations and exclusions may not apply to you. This Warranty gives you specific legal rights, and you may also have other rights which may vary from jurisdiction to jurisdiction. THE RE-EXPORT OF UNITED STATES ORIGIN SOFTWARE IS SUBJECT TO THE UNITED STATES LAWS UNDER THE EXPORT ADMINISTRATION ACT OF 1969 AS AMENDED. ANY FURTHER SALE OF THE PRODUCT SHALL BE IN COMPLIANCE WITH THE UNITED STATES DEPARTMENT OF COMMERCE ADMINISTRATION REGULATIONS. COMPLIANCE WITH SUCH REGULATIONS IS YOUR RESPONSIBILITY AND NOT THE RESPONSIBILITY OFAP.
Reading notes: Line 'limitatiions' contains an apparent typo in the source copy 'APP shall have no obligation' may be a typo for 'AP'
- Printed product names
- CD-ROM
- Printed dates
- 1969
- Languages
- English
PDF page 4
TM Software Develop111ent • using PowerP/ant™ Jan L. Harrington • ~ ~ OF£55\0Z. AP PROFESSIONAL AP Professional is a division of Academic Press, Inc. Boston San Diego New York London Sydney Tokyo Toronto
Reading notes: Title line 'Software Develop111ent' contains OCR-like digit errors; read as 'Development'. Characters in the publisher logo area are garbled and unreadable.
- Languages
- English
PDF page 5
Al --~ 0tEss10~ AP PROFESSIONAL An Imprint of ACADEMIC PRESS, INC. A Division of HARCOURT BRACE & COMPANY ORDERS (USA and Canada): 1-800-3131-APP or APP@ACAD.COM AP Professional Orders: 6277 Sea Harbor Dr., Orlando, FL 32821-9816 Europe/Middle East/Africa: 0-11-44 (0) 181-300-3322 Orders: AP Professional 24-28 Oval Rd., London NWI 7DX japan/Korea: 03-3234-3911-5 Orders: Harcourt Brace japan, Inc., lchibancho Central Building 22-1, lchibancho Chiyoda-Ku, Tokyo I 02 Australia: 02-517-8999 Orders: Harcourt Brace & Co. Australia, Locked Bag 16, Marrickville, NSW 2204 Australia Other International: (407) 345-3800 AP Professionai Orders: 6277 Sea Harbor Dr., Orlando FL 32821-9816 Editorial: 1300 Boylston St., Chestnut Hill, MA 02167 (617)232-0500 Web: http://www.apnet.com/approfessional This book is printed on acid-free paper. 8 Copyright© 1996 by Academic Press. Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the publisher. All brand names and product names mentioned in this book are trademarks or registered trademarks of their respective companies. United Kingdom Edition published by ACADEMIC PRESS LIMITED 24-28 Oval Road, London NW I 7DX Library of Congress Cataloging-in-Publication Data Harrington, Jan L. CodeWarrior software development using PowerPlant I Jan Harrington. p. cm. Includes index. ISBN 0-12-326422-7 I. Computer software--Development. 2. Macintosh (Computer)- -Programming. 3. Object·oriented programming (Computer science) 4. PowerPlant. 5. CodeWarrior. I. Title. QA76.76.D47H38 1996 005.26'2--dc20 96-13291 CIP Printed in the United States of America 96 97 98 99 IP 9 8 7 6 S 4 3 2 I
Reading notes: OCR-style noise in the copyright and catalog lines, such as 'Al', '0tEss10~', and 'I' used for digits, so some numbers may be misread. Front matter ordering is fragmented; the book title 'CodeWarrior software development using PowerPlant' appears only inside the cataloging data.
- Printed product names
- CodeWarrior · PowerPlant
- Printed dates
- 1996 · 96-13291
- Languages
- English
PDF page 6
Contents Preface xi The Sample Program xii What You Need to Know xm Acknowledgments xv Chapter 1: Introducing PowerPlant 1 PowerPlant as an Application Framework 2 What You Need to Use PowerPlant 3 PowerPlant Class Types 3 The PowerPlant Class Hierarchy 5 Class Naming Conventions 7 The Application Classes 7 Creating the Application object 8 The Application and the Event Loop 9 Interclass Communication 11 v
Reading notes: Table of contents page numbers and some characters appear damaged or ambiguous (e.g., 'xm' for 'xiii', 'Use' spacing).
- Languages
- English
PDF page 7
vi Contents Commanders 13 Broadcasters and Listeners 19 PowerPlant Objects 20 PowerPlant Object Classes 21 Registering PowerPlant Objects with URegistrar 21 Creating PowerPlant objects 23 Panes and Views 24 Exception Handling 27 Chapter 2: Penultimate Videos 29 The User's View 29 Handling Inventory 30 Handling Customers 34 Handling Transactions 35 The Programmer's View 37 The Merchandise_Item Hierarchy 37 The Item_copy Hierarchy 41 The Customer Class 43 The Binary Search Trees 43 The Date Class 46 Utility Functions 48 Chapter 3: PowerPlant Projects 49 The Starter Projects 49 The Starter Projects 50 The Starter Source Code File 51 Customizing the Application Class Header 52 Program Structure: To Subclass or Not to Subclass 53 Modifying Starter Application Functions 57 PowerPlant Starter Resource Files 57 Adding Support for Apple Events 59 Adding Support for ANSI Functions 60 The Penultimate Videos Projects 60 PowerPlant and Precompiled Headers 61 Chapter 4: PowerPlant Menus 67 Creating Menu Resources with a Standard Resource Editor 68
Reading notes: Source appears to be a table of contents rather than advertising copy; no headline or advertised products identified.
- Languages
- English
PDF page 8
Contents vii Menu Resources for the Penultimate Videos Program 71 Constants for Menu Commands 71 Creating Menu Resources with Constructor 73 Creating a New Menu Resource 76 Adding a New Menu Item 77 Maintaining Menu Items 79 Creating the Menu Bar 79 Activating and Deactivating Menus 80 Trapping Menu Selections 82 Chapter 5: Panes and Views 85 Pane Geography 86 Declaring a Subclass for a Pane 87 Creating a Pane Resource for Drawing 88 Starting a Constructor Resource File 88 Creating a Resource 89 Customizing Resource Contents 90 Pane Binding 96 The Graph Subclass and Its Constructors 97 The CreateXStream Function and How PowerPlant Objects are Created 99 Drawing in a Pane 105 Coordinate Systems 106 Doing the Drawing 107 Playing a QuickTime Movie: Panes without PPobs 111 Custom Panes 114 Defining the Custom Pane 114 Creating the Pane Subclass 119 Programming for a Window with a Custom Pane 123 Chapter 6: Editing Text 127 The Note Class 128 PowerPlant Objects for Editing Text 129 Adding the Scroll Bar 129 Adding the LTextEdit Object 133 The LTextEdit Class 137 Text Access Functions 137 Flashing the Cursor: Periodic Events 140
- Languages
- English
PDF page 9
viii Making It Multistyled 141 Creating a Note Object 142 Completing the Note Object 144 Handling the Text Menus 146 UTextMenusBase and Its Subclasses 146 Text Menu Resources 147 Initializing the Text Menus 150 Enabling TExt Menus 150 Processing Text Menu Selections 153 Implementing Undo 153 The Action and Undoer Classes 153 Implementing the Undo and Redo 156 Chapter 7: Dialog Box and Control Resources 165 Creating Dialog Box Resources 167 Configuring the Window Type 168 User Data 171 Button Messages 171 Adding Display Text and Edit Fields 172 Objects of Class LCaption 172 Objects of Class LEditField 173 Adding Control Resources 175 Buttons 175 Popup Menus 177 Radio Buttons 179 Check Boxes 180 RidL Resources 182 Preparing Resource and Message Constants 183 Chapter 8: Programming for Dialog Boxes and Controls 187 Deciding Whether to Subclass 188 Displaying a Dialog Box 188 Enabling Undo 190 Adding Listeners for Other Controls 190 Positioning the Insertion Point 191 Trapping Button Actions 191 Removing a Dialog Box 192 Contents
Reading notes: Source is a table of contents; no headline or advertised content is present. Some letters in 'TExt Menus' appear irregularly capitalized as printed.
- Languages
- English
PDF page 10
Contents ix Handling Edit Fields 193 Retrieving Data from Edit Fields 193 Putting Data in Edit Fields 193 Clearing Edit Fields 194 Working with Check Boxes 196 Working with Radio Buttons 196 Handling Popup Menus 197 Manipulating Display Text 199 A Complete Dialog Box Example 200 Responding to "Live" Controls 202 Chapter 9: List Boxes and Tables 209 List Boxes 209 List Box Resources 210 Building the Contents of a List Box 210 Finding the Selected List Item 214 Capturing a Double-Click in a List Box 214 Tables 216 Table Resources 217 Table Subclasses 220 Initializing Table Storage 221 Building the Contents of a Table 222 Drawing Table Cells 223 Finding the Selected Cell 226 Chapter 10: Strings, Lists, and Files 227 Strings 227 LString and LStr25 5 228 Subclassing LString: PString 230 Adding a Class for C Strings: CString 232 Using the String Classes 234 Lists 235 Creating and Maintaining a List 236 Using a List Iterator 238 Files 239
Reading notes: Source appears to be a table of contents with no primary headline or advertising copy
- Languages
- English
PDF page 11
x Chapter 11: Repeated Actions: Periodicals 245 The LPeriodical Class 246 Subclassing to Create a Periodical 247 Programming Support for a Periodical 248 Chapter 12: Printing 251 How PowerPlant Printing Works 252 A Program's Printing Tasks 252 The Printing Process 252 LPrintout' s Limitations 253 Creating LPrintout Objects 253 Coding Simple Printing 257 Adding Support for the Printing Dialog Boxes 259 Appendix: Binary Search Trees 263 The Binary Tree Data Structure 264 Searching a Binary Tree 265 Inserting Nodes into a Binary Tree 266 Deleting Elements from a Binary Tree 269 Tree Traversals 272 The In-Order Traversal 272 The Pre-order Traversal 273 Object-Oriented Binary Trees 273 Tree Container Classes 277 Traversal Iterators 279 Glossary 285 Index 289 Contents
- Languages
- English