gettingstarted
[Top] [All Lists]

Re: I don't get why this won't work

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: I don't get why this won't work
From: Emile Schwarz <emile dot a dot schwarz at wanadoo dot fr>
Date: Thu, 28 Apr 2005 18:27:48 +0200
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <20050428145007 dot ED9E48F7768 at lists dot realsoftware dot com>
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>

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