gettingstarted
[Top] [All Lists]

Re: WriteLine in TextOutputStream

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: WriteLine in TextOutputStream
From: Phil Heycock <pheycock at bellsouth dot net>
Date: Mon, 27 Oct 2003 00:37:22 -0500
It would be helpful if you could tell us what it is you are trying to write
to file. "Text property from various controls" doesn't quite get it. Anyway,
I see that you have Dimmed a string variable "L". Maybe you ought to make it
equal to the text property of one of your various controls, and write that:

    L = someControl.text
    FileStream.WriteLine L

or, you could just do this:

    FileStream.WriteLine someControl.text

A little more information might lead to better help, though.

PWH
*****************************************************

on 10/26/03 11:38 PM, Wayne Dreier at wwdmld at earthlink dot net wrote:

> I'm trying to write the text property from various controls to a text
> file using a for - next loop.
> 
> Here is the code I have come up with so far:
> 
>  Dim File As FolderItem
>  Dim FileStream As TextOutputStream
>  Dim i As Integer
>  Dim Counter As Integer
>  Dim L As String
> 
>  File = GetFolderItem("Source File")
>  FileStream = File.AppendToTextFile
>  Counter = Census1790.ControlCount
>  For i = 0 to Counter
>    FileStream.WriteLine
>  Next
> 
> My problem is I cannot figure out what comes after FileStream.WriteLine.
> I've written to files before but always used this construction -
> FileStream.WriteLine EditField1.text. Since I have an unknown number of
> controls I wanted do a loop instead. I know it should be very simple but
> whatever I try gives me a compiler error, usually Type Mismatch.
> 
> Can someone help me out?
> 
> Thanks.
> 
> Wayne


 - - -
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>