home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14841 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.9 KB

  1. Path: sparky!uunet!wupost!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!tamsun.tamu.edu!bpb9204
  2. From: bpb9204@tamsun.tamu.edu (Brent)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Is there a PD console package for Mac?
  5. Keywords: mac, console, pd
  6. Message-ID: <1992Sep1.181439.21825@tamsun.tamu.edu>
  7. Date: 1 Sep 92 18:14:39 GMT
  8. Article-I.D.: tamsun.1992Sep1.181439.21825
  9. References: <1992Aug30.191335.4377@intrepid.com>
  10. Organization: Texas A&M Univ., Inc.
  11. Lines: 30
  12.  
  13. vladimir@intrepid.intrepid.com (Vladimir Vukicevic) writes:
  14. |Does anyone know of a PD 'console' package, like THINK provides? I have THINK C,
  15. |but I am really looking for the source of one, because I would like to add
  16. |more features (I am writing a CLI). If there isn't one, does anyone know
  17. |of a way to do I/O on the mac (with, for example, printf() & fgets()...)?
  18. |I was thinkning of creating a window, and then using TextEdit, but I can't
  19. |figure out a way to make the prompt non-overwriteable, and how to get a specific
  20. |part of the text. Any ideas? Suggestions? Comments?
  21.  
  22.  
  23. Vladimir,
  24.  
  25. Good news!  I've done this exact thing and I posted info about it many months
  26. ago but got no response (nobody needed it then, I guess).  What I have done
  27. is to create a "shell" window that has a simple TextEdit area.  The
  28. area has a typical prompt printed that the user cannot change.  The user
  29. is allowed to type, edit, copy, paste, etc into this area and then when
  30. the user hits the <Enter> key, the program sucks the new text out that the
  31. user entered.  Processing is not done for the <Return> key;  therefore, the
  32. entered text may have line breaks in it.
  33.  
  34. The prompt text string is stored in a resource and can be changed.
  35.  
  36. There is also a basic routine to Print() strings to the window (what you
  37. put in the string to print is up to you -- use NumToStr(), sprintf(), 
  38. whatever).
  39.  
  40. I'll gladly make the source available to anybody interested.
  41.  
  42. -Brent
  43.