gettingstarted
[Top] [All Lists]

Re: Help with accessing file

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: Help with accessing file
From: "Lennox Jacob" <lenpartico at hotmail dot com>
Date: Thu, 31 Mar 2005 22:36:59 +0000
Delivered-to: gettingstarted at lists dot realsoftware dot com
Thanks Ken,
Works great.
Lennox.


From: Ken Jordan <jordan at digi-net dot com>
Reply-To: Getting Started <gettingstarted at lists dot realsoftware dot com>
To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Help with accessing file
Date: Thu, 31 Mar 2005 09:59:47 -0500

Hi

FI is only a reference to a file. It does not contain the contents of that file. To access the contents of the file you must first open the file , then read in the data contained in the file. (It's a good idea to verify that the file exists, etc.) Something like:

Dim FI as FolderItem
Dim fileText As String
Dim inStream As TextInputStream

FI = GetFolderItem("Txt1")
If(FI <> Nil AND FI.Exists) Then
 inStream = FI.OpenAsTextFile
 fileText = inStream.ReadAll
 .
 .
 g.DrawString fileText, ...
 .
 .
EndIf

FolderItem and TextInputStream in the LR have more info. Look at TextOutputStream for writing back to the file.

HTH

Ken

Lennox Jacob wrote:

Hi Mike,

the compile errors are-

g.drawstring F1, 36,236,540 -- Parameters are not compatible with this function (drawstring) g.drawstring F1.text, 36,236,540 -- This method or property does not exist (text)

Thanks.

Lennox.

From: "POIDINGER, Michael [JJRAU]" <MPOIDING at MEDAU dot JNJ dot com>
Reply-To: Getting Started <gettingstarted at lists dot realsoftware dot com>
To: "'Getting Started'" <gettingstarted at lists dot realsoftware dot com>
Subject: RE: Help with accessing file
Date: Thu, 31 Mar 2005 13:03:03 +1000





> -----Original Message-----
> From: gettingstarted-bounces at lists dot realsoftware dot com
> [mailto:gettingstarted-bounces at lists dot realsoftware dot com] On
> Behalf Of Lennox Jacob
> Sent: Thursday, March 31, 2005 12:57 PM
> To: gettingstarted at lists dot realsoftware dot com
>


Subject: Re: Help with accessing file

>
> Thanks Brad,
> I changed it as you suggested and put Txt1 in the same folder
> as myApp but g.drawstring F1, 36,236,540 or g.drawstring
> F1.text, 36,236,540 or g.drawstring Txt1, 36,236,540 or
> g.drawstring Txt1.text, 36,236,540 does not compile, any more
> suggestions?
> Thanks again.
> Lennox.

What is the compilation error?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

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


_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

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

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


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

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

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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

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

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