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