Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ames!haven.umd.edu!uflorida!shark!jboser From: jboser@cs.fau.edu (Jeff Boser) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing windows Message-ID: <1991May28.095602.25506@cs.fau.edu> Date: 28 May 91 09:56:02 GMT References: <21620@brahms.udel.edu> <1791@babcock.cerc.wvu.wvnet.edu> Distribution: usa Organization: Florida Atlantic University, Boca Raton Lines: 79 In article <1791@babcock.cerc.wvu.wvnet.edu> vrm@babcock.cerc.wvu.wvnet.edu (Vasile R. Montan) writes: >From article <21620@brahms.udel.edu>, by stas@brahms.udel.edu (Stanislaus Pietrucha): > >> 1. Which volume(s) should I get first, with basic information in them. Info >> I'll need to write a Mac application with Mac-type interface? >In spite of what many people say, I *don't* recommend IM as a set of books >for learning how to program the Mac. This is not to say that they are not >worthy publications; they are indeed remarkable for their thoroughness. >Unfortunately, this same thoroughness necessarily comes at the expense of >clarity. I recommend starting with a more introductory book; once you >master the basics and want to move into more esoteric techniques, then >IM is just the thing. I must have missed a club meeting. I have YET to hear of someone recommending that someone learn to program the mac solely from IM (I have, and I dont). The fact is, if you plan on writing anything beyond HelloWorld, IM is absolutely necessary. Just as there are books teaching languages, the tech docs are the truth, the whole truth, and nothing but the truth. So, if you are learning to program on the mac, I tell you three times: 1) learn C or Pascal, and do not worry about mac stuff. 2) Buy IM, as many of the volumes as you can carry. 3) THEN get a intro book, and start playing with sample code. Macintosh Revealed (I have all 4) is a good INTRODUCTION, but does nothing for a programmer who wants to do his own thing. The same goes for Mac Programming Primer. I own about 8 other introduction books, and have learned something from each and every one, but they all pale before the information contained in IM. In fact, the intro books are unnecessary for experienced and capable (both, not either) programmers. IM describes all the Toolbox routines, how to use them, and when to use them. And it is written incredibly well, to boot. And YOU CANNOT DO WITHOUT IT! >My preference is Macintosh Revealed by Stephen Chernicoff. Volumes I >and II are essential; volumes II and IV are nice but not necessary. >Each is around $26. These books will cover 80% of all the things you >will ever need to do. I have all 4 volumes, and they are no where near as complete as you claim. The chapter summaries and references are cryptic to say the least, and the routine descriptions and their uses are separate. If you, as a professional, take any pride at all in your resources, skimping on literature is not going to save you anything, least of all money and time, in the short and long run. Even though it will mean eight movies I will have to give up, I am going to get IM 6, when it becomes available here. I am sick and tired (or is that tired and sick?) of people whimping out, trying to just get by, and generally trying to take shortcuts. >> 2. How can I create a window on the screen. Basically I ask because when >> I run an application created with Think C I get this stupid window that >> says "console" and I want to open my own window(s) within the application. >There's two basic ways. The first way is to totally create the window >from scratch within your program. The second way is to load in the >window as a resource. whoh.. what a concept: IM1-Table of contents: The Window Manager, Using the Window Manager: page 280: "When appropriate in your program, use NewWindow or GetNewWindow to create any windows you need; these functions return a window pointer, which you can then use to refer to the Window. NewWindow takes descriptive information about the window from its parameters, whereas GetNewWindow gets the information from a window template in a resource file." Two pages away are detailed descriptions of exactly what NewWindow and GetNewWindow do and what to pass as parameters. If you read your Think C docs (another big concept!), you will find out what a console window is, and what it is used for. So... to sum up, If you are daunted by the size of IM, or the learning curve of mac programming, GET OUT OF THE PROFESSION! You are only lowering the state-of-the-art. .....jeff jboser@tuna.cs.fau.edu -- "Make something an idiot can use, and only an idiot will use it." - RAH Like a bible, maybe? - me