Subject: A2U: HyperCard IIgs Course - Preview From: CUTjefbla@bconnex.net (Jeff Blakeney) Date: Fri, Oct 2, 1998 10Ç43(H Message-id: <36150c85.3328273@news.bconnex.net> HyperCard IIgs Course Lesson 0 Preview Copyright (c) 1998 by Gareth Jones PURPOSE OF THE COURSE This course in HyperCard IIgs ("HCGS," for short) takes a student who knows the basics (what a stack is, what a button is, what a text field is) through designing and making a fairly advanced project. The project that I've settled on is an appointment calendar, a type of program sometimes called a "Personal Information Manager" or "PIM" in the Mac and Windows worlds. Each step in making this stack will be discussed in a written lesson. You will learn why the stack is being designed the way it is, and alternatives to each choice. The final stage of the course is to alter the stack to meet your own needs better. Your choices will be made on your own needs, but I'll help out with any programming difficulties that you run into in this stage. BEFORE YOU START There are three prerequisites to following this course. 1. You must have a system that can run HCGS. HCGS needs a IIgs system with: a. 2 MB or more of RAM b. A 3.5" disk drive c. A hard drive If you don't have these three requirements, then you may want to get them. Not only HCGS, but almost all major IIgs programs need them. Think of this course as a spur to do something that you should do for other reasons. 2. You must have HCGS If you can run HCGS, then you may need to obtain a copy. It is no longer sold by Apple, but all six 3.5" disks can be downloaded for free from Apple or from Delphi's file library. The web address to get it from Apple is: http://swupdates.info.apple.com/cgi.bin/lister.pl?Apple.Supp ort.Area/Apple.Software.Updates/US/Apple_II/HyperCard_IIGS_1 .1 [Dean's NOTE: The above URL did not work for me but the following one did: ftp://ftp.apple.com/Apple_Support_Area/Apple_Soft ware_Updates/US/Apple_II/HyperCard_IIGS_1.1/ ] If this looks too complicated to type, there is a link to this site on Steve Cavanaugh's Apple Blossom web site at http://people.delphi.com/appleblossom [Dean's NOTE: The URL on this page may not work either.] Getting HCGS from the web has one disadvantage. The manuals are not included. You can buy the manuals, and even a set of disks, from The Byte Works. The relevant product numbers are: a. APDA-48 Getting Started with HyperCard IIGS (manual) $15.00 b. APDA-49 HyperCard IIGS Reference (manual) $25.00 c. APDA-50 HyperTalk (manual) $15.00 d. APDA-51 HyperCard IIGS disks $10.00 e. APDA-52 HyperCard IIGS (APDA-48 to APDA-51, disks and all manuals) usually $60, but course participants may get this for a discounted price of $50. According to the catalogues, US and Canadian customers should add $5.00 per order (not per item) for shipping and handling. Call or write from other countries to find the shipping and handling cost. The Byte Works can be contacted at MikeW50@AOL.com, at their web site at BYTEWORKS@GENIE.geis.com or by mailing to: Byte Works, Inc. 8000 Wagon Mound Drive NW Albuquerque, NM 87120 U.S.A. 3. You must be sufficiently familiar with HCGS to follow the instructions. This course, as mentioned, depends on the student knowing a little about HCGS: what a stack is and what a field or button or script is. That knowledge can be obtained from several sources, and doesn't take long to pick up. Try these sources: The HCGS Tour: the first thing to try after installing HCGS is to launch it, then click (once) on the button for Tour. This will familiarize you with the HCGS tools and terminology. The HCGS Help stacks: Click on the "Help" button after launching HCGS, or choose "Help" from the "Go" menu, to find an on-line equivalent to a reference book on HyperCard. If you don't have real reference books, rely on these stacks heavily. The Official Manuals: I recommend these highly. The first manual, Getting Started with HyperCard IIgs, covers the most basic aspects of creating and modifying stacks in a tutorial fashion. The HyperTalk Beginner's Guide is quite elementary (as the title indicates), but holds the hands of the nervous pretty well. Even if you decide not to get those manuals, I strongly recommend that every participant have a copy of the HyperCard IIgs Reference_. Its 389 pages cover every aspect of HCGS (except scripting). Gareth Jones' HyperCard articles: If you don't have the HCGS manuals, but want to get started, I've written a series of articles on HCGS. One provides an overview of the program. Two discuss creating a simple word processing stack that can load and save text files. Creating that stack is good preparation for this course, though not so good as the "Birds" stack in the manuals. Steve Cavanaugh has these articles up at: http://people.delphi.com/appleblossom/hq/ [Dean's NOTE: Add "articles/hcgsarticles.html" to the end of the URL above to go directly to Gareth's HCGS articles.] They may also be available now in the Delphi file library. Last, but not least important, HangTime is available every Tuesday night to answer questions about HyperCard in A2Pro's "HyperBar & Grill Real Time Conference." To get there once you've telnetted in, type "go com a2pro conference". If you are visiting via the web and have a Java-enabled browser you can go to http://www.delphi.com/a2pro and follow the links to the "Chat Rooms". [Dean's NOTE: Or you can go to the following URL which will tell you what chat(s) are currently taking place in the A2Pro conference area: http://www.delphi.com//dir-app/chat/forumchat.asp?sigdir=a2pro ] THE PLAN This course is a series of written lessons plus support stacks showing the progress of the project from lesson to lesson. The lessons, as I currently conceive them, will be: 0. Lesson 0, this one, which gets the student ready for the course, discusses the stack in general terms, and tells everyone how to get set up for... 1. Lesson 1, sets up the backgrounds used in the stack. Homework, personalizing the artwork for the backgrounds. 2. Lesson 2, The script to automatically move from card 1 to card 2 after launching the stack. Visual effects, and how to choose them. Homework: experiment with visual effects and choose ones for this stack. 3. Lesson 3, card fields and buttons vs. background fields and buttons. Create card fields and buttons on the Menu card. Create some background fields and buttons on the Date background. Homework: add some made-up appointments for various days, enough to give a good workout for lesson 5. 4. Lesson 4, sorting a stack and creating a clickable menu. In this case, the Menu card will get a menu of dates, in their proper order, and clicking on a date in the field will take you to a card with appointments for that date. This will be your first field script. 5. Lesson 5, simplifying data entry. In this lesson, you set up a data entry system that involves a specialized card. 6. Lesson 6, XCMDs, XFCNs, and creating popup lists. You will create popup lists to ease the job of entering the Year, Month, and Day for each Date card. In the process, you will become familiar with the Scripters' Tools stack. 7. Showing and hiding information. Shared and unshared text. By using a background field which does NOT share text, you can enter and show more information than is shown on the screen. Fields used for information storage but not information display can be hidden. 8. Creating a calendar. An on-screen calendar is a perfect addition to an appointment manager, but involves a bit of programming. I think that we can manage to put this classy feature in. 9. Finishing up. I'm sure that many little tweaks and features will have been put off until the end, and here they are! The topic of sounds will probably go here. 10. Personal project. This can either be extra features in your appointment calendar or a completely new HCGS stack that you've thought of. I'll be available, as will my helpers, to discuss individual problems in programming and design. Submission of the personal project will result in the right to run my official "Certificate of Completion" stack. :-) I reserve the right to modify this outline as the course progresses. My ideas may clarify, or students' comments may require a change or two. SOME COMMENTS ABOUT DESIGNING STACKS Most books on programming recommend a strategy called "top-down programming." For example, in the entertaining book ELEMENTARY PASCAL (by Henry Ledgard and Andrew Singer), Sherlock Holmes opines: In my engagements as a criminal investigator I have always been careful to arrange all clues systematically and devise a complete hypothesis to a case before taking a single step out of my rooms in pursuit of a solution. The principle applies equally well to the use of the Analytical Engine [computer]. No matter how simple the task, it is necessary at the outset to formulate a clear and complete statement of the problem at hand, as well as a basic plan for solving it. The programmer should prepare sample input and output formats and design a general algorithm before writing any programme. In other words, as I understand it, the top-down approach designs the program before writing it. An excellent plan. HCGS differs from other languages, however, because you don't have to design with pencil and paper first -- you can work just as well using the pencil, field, and button tools on the computer screen. When the design is good enough, half the work is done. A second aspect of HCGS is that a small, working program can be part of an object, such as a button or field, and will move with it when it is cut and pasted. So, let's say that you've decided to add a "Home" button to your stack. You can Copy a button from another stack, paste it into your own, and (more than likely) it will work perfectly. This can make a simple stack more like assembling the parts of an Erector Set than sitting down to write a program. Finally, my experience has been that a small, working stack can gain features over time as they occur to you. I will use this fact in the lesson to introduce quick-and-dirty solutions to a problem in one lesson, but replace them with something more elaborate later. HOMEWORK The homework for this week is simple. Get and install a copy of HyperCard and familiarize yourself with its tools. In the next lesson, we will start building a stack. === To ensure I see a reply please also e-mail me but remember to: CUT the obvious from my e-mail address to e-mail me Jeff Blakeney - Dean of the Apple II University on Delphi