home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14990 < prev    next >
Encoding:
Text File  |  1992-09-03  |  2.1 KB  |  53 lines

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