HI,
if your code store two lines of text, you can read them with the below code (if
there is a file named "InternetPal Settings" in _your_ PreferencesFolder).
BUT, the first line is stored in a string variable named hp and you don't do
anything with it in the provided code.
Also, if settingsWIN.welcomespeech setting are good, you can be able to see
something if you watch carefully.
But, if the textcolor is white, the height or/and width is too small for a char
to being displayed, if the captain does not shave its beard or have red hair...
Also, if the TextEncoding is not correct and you use a non ascii character, you
can be in a situation that no character is loaded / displayed. Some other
situations exists.
At last, if you add a code to check if an error occured after each read, you can
fine tune the reading process.
When people told you to use the debugger it is not to pun you; in the debugger,
you can click to have one line executed at a time and see the variables
values... Be sure to add a breakpoint in the line you want to start the run step
by step :)
Yeah ! This is my GA for the whole month.
Cheers,
Emile
PS: I have trouble with my memory, but I remember you are on that one since...
weeks.
gettingstarted-request at lists dot realsoftware dot com wrote:
Subject: I don't get why this won't work
From: Brian Heibert <brian at heibertservices dot com>
Date: Wed, 27 Apr 2005 21:57:47 -0500
Dim f as folderitem
Dim t as textinputstream
dim hp as string
f=preferencesfolder.child("InternetPal Settings")
if f <> Nil then
t = f.OpenAsTextFile
settingsWIN.homepage.text= t.readline
hp = t.readline
settingsWIN.welcomespeech.text = t.readline
t.close
end if
SettingsWIN.close
_______________________________________________
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>
|