gettingstarted
[Top] [All Lists]

Re: Create Constant for chr(13) and the like

To: <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Create Constant for chr(13) and the like
From: "Barry Traver" <btraver at traver dot org>
Date: Wed, 30 Jun 2004 16:09:18 -0400
Delivered-to: gettingstarted at lists dot realsoftware dot com
Importance: Normal
List-help: <mailto:gettingstarted-request@lists.realsoftware.com?subject=help>
List-id: Getting Started <gettingstarted.lists.realsoftware.com>
List-post: <mailto:gettingstarted@lists.realsoftware.com>
Joe,

Thanks for the tips.

I have a number of VB programs where I load in the contents of a text
file into a textbox (or "editfield") for display and into a string array
(one line per element) for manipulation.  After I'm finished doing what
I want with the array elements, I combine them back into a long string
which I save back to disk as the contents of a text file.

I have a question for you.  (I should really take time to carefully go
through the RB documentation and see if I can figure it out for myself,
but you may have a quick answer for me.)

I know how to use f.OpenStyledEditField w.TextField (from the tutorial
program) to load in the contents of a text file into a textbox (or
"editfield").

QUESTION:  What's the best and/or simplest way to put that information
from the text file into a string array (one line per element) for
manipulation?  (Should I do a loop testing for the EndOfLine delimiter?
Or should I load it in, in a different way, using ReadLine?)

After I manipulate the string array elements, I should then be able by
myself to concatenate the modified elements (I note that REALbasic uses
"+" rather than "&" for string concatenation) and save the final result
back to disk in the usual way (i.e., Document.SaveStyledEditField in the
tutorial program).

If you can advise me on the preferred way to handle this one task (i.e.,
putting the file contents into a string array), I've got lots of
programs I should be able on my own to port over from Visual Basic
(including one, for example, for webmasters to use to make it more
difficult for SpamBots to harvest email addresses from Web pages).

WORD OF ENCOURAGEMENT:  That may mean that I'll have enough to keep me
busy that I won't be bothering you with questions for a while <grin>.

Barry Traver

P.S.  I _am_ working my way through the REALbasic documentation, page by
page, and will have fewer questions as I go along anyway, but I guess
I'm impatient right now and want to port over at least some of my VB
programs as soon as possible.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>