Forum Navigation
You need to log in to create posts and topics.

Re: Text from File to Variable$

Posted by: friedo <friedo@...>

On Tue, 2 Dec 1997, Bill Kuck wrote:

> When I get an error, I like to look up the error code ID in a predesigned
> text file and extract the text corresponding to the error ID into a string
> variable$. I can then use this variable$ as parameter text in an alert
> call.
>
> Can this be done without uploading the text file into an edit field and
> then doing the search (big file).
>
> I started looking back through all the memos in FB and I found an oldie,
> but goodie from the AOL days asking a somewhat similar question. I had
> only one thread to this memo and it was not the solution.

If you're using PG, there's a really easy way to do it. Put all the error
codes in one of the STR# resources, (i forget which one off hand) and use
the PG error functions to do the alert. There's an excellent example in
the PG tutorial, I believe it's File Viewer.

>
> >Subj: String to TE
> >Date: 96-09-04 15:49:55 EST
> >From: BruceM88
> >
> >I am trying to read text from a file in a string and put that text into an
> >edit field. (There is a reason I am using a string and not reading the
> >whole file.) I thought there was some code around here that shows this,
> >but I can't find it. Also want to put text from an edit field into a TEXT
> >resource. Any ideas? Thanks.
> >
> >Bruce M.
>
> bill
>
>
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@welovegod.org>
>