home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!keith@taligent.com
- From: keith@taligent.com (Keith Rollin)
- Subject: Re: Problems in Macintosh Programming Secrets
- Message-ID: <Bu1LI3.1zD@taligent.com>
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Organization: Taligent
- References: <1992Sep4.010109.1710@ucbeh.san.uc.edu>
- Date: Fri, 4 Sep 1992 07:15:39 GMT
- Lines: 41
-
- In article <1992Sep4.010109.1710@ucbeh.san.uc.edu>, rainwatr@ucbeh.san.uc.edu
- writes:
- >
- > I'm trying to get the example programs to work from the Second Edition of
- > Macintosh Programming Secrets by Scott Knaster and Keith Rollin. I'm having
- > a little trouble with the program in Chapter 4, specifically with the changes
- > to the MainEventLoop function in Standard Stuff.c. The line in question is:
- >
- > itemWasHit = DialogSelect(&event, &theDialog, &itemHit);
- >
- > When I try to compile the source file, I get the message " 'theDialog' has
- > not been declared." There is another occurrance of 'theDialog' a couple of
- > lines later, so I don't think it's a typo.
- >
- > As far as I can tell, there is no function prototype in any of the files
- > for DialogSelect. I'm assuming there should be. (?)
- >
- > There were other variables in MainEventLoop that no declaration was listed
- > for, including passToDialog, itemWasHit, and sleepyTime. I made some
- > assumptions which I think are correct - I declared the first two as
- > Booleans, and sleepyTime as a long.
- >
- > Anyway, can someone tell me what theDialog should be? A DialogPtr perhaps?
- >
-
- Sorry for the confusion there. Yes, "theDialog" should be a DialogPtr. Scott I
- and didn't want to waste pages and pages going into excrutiating detail on
- everything, so we left a few out in some places. Missing declarations whose
- types are obvious are such a place. In this case, you know that "theDialog" is a
- DialogPtr because that's what the Dialogs.h files says DialogSelect() takes as
- the second parameter.
-
- > Also, are there any other gotchas to watch out for in the rest of the book?
-
- You tell me.
-
- --
- Keith Rollin
- Phantom Programmer
- Taligent, Inc.
-
-