home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!joshr
- From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
- Subject: Re: updating window text / getting text lines from buffer
- Message-ID: <1992Aug25.232449.12720@kronos.arc.nasa.gov>
- Sender: usenet@kronos.arc.nasa.gov (Will Edgington, wedgingt@ptolemy.arc.nasa.gov)
- Nntp-Posting-Host: kronos-arclan.arc.nasa.gov
- Organization: NASA/ARC Information Sciences Division
- References: <86967@netnews.upenn.edu>
- Date: Tue, 25 Aug 1992 23:24:49 GMT
- Lines: 36
-
- In article <86967@netnews.upenn.edu> peter@sysnext.library.upenn.edu (Peter C. Gorman) writes:
- >I have a couple of basic text-handling questions (using Think C):
- >1. What's the standard way to update text in a window? For instance, if I
- >display a value that needs to be changed periodically, do I DrawString(),
- >then at update time draw a white rectangle over it and DrawString with the
- >new value?
-
- This is a good, quick way.
-
- >
- >2. If I load a text file into a buffer, what's the best way to get it out
- >a line at a time? Do I write a version of fgets that gets it from the
- >buffer, or is this a standard Mac function that's posted somewhere?
-
- Sure, write the fgets-type function. there is a method of reading from
- a file documented somewhere in IM for getting the filemanager to
- parse files into lines delimited by any desired char ('\n' in this case)
- using PBRead (I believe).
-
- If anyone has written a code snippet that does this, pls. inform me
- as to how this is done. Posting here is okay, but mailing me a code snippet
- would be godly.
-
- Thanks
-
- >Peter Gorman
- >University of Pennsylvania
- >Library Systems Office
- >peter@sysnext.library.upenn.edu
-
-
- --
- ----------------------------------
- #include <std/disclaimer.h> Josh Rabinowitz, Mac TCL programmer
- joshr@kronos.arc.nasa.gov
- "Send a salami to your boy in the army" - Katz's delicatessen, NYC
-