[Gambas-user] Interesting Problem

Mr JH Deval johdeval at ...43...
Tue Sep 14 17:32:51 CEST 2004


Let me start by saying I may have found a bug I am not
sure but I am posting this to find out.

Let me give some background. I was not satisified with
the location of the .conf file in a .gambas directory
so I proceed to write my own using a similiar syntax
as getsetting and savesetting in VB. Here is the code
but the problem is when the loop runs to read the conf
file in each consequtive round put a character in the
first location first line. Which obviously causes me
some problems.

  IF ConfFileExists = TRUE THEN
    confOutput = ""
    OPEN AppHomeDir & AppTitle & ".conf" FOR READ AS
#confFile
      DO WHILE NOT Eof(confFile)
        LINE INPUT #confFile, strExisting
          IF strExisting <> "" THEN
            OldSetting = Split(strExisting,"=")
            IF UCase(OldSetting[0]) = UCase(Setting)
THEN
              OldSetting[1] = SettingToSave
            END IF 'Oldsetting[0] = Setting
            IF OldSetting[0] <> "" THEN
              confOutput = confOutput &
Trim(OldSetting[0]) & "=" & Trim(OldSetting[1]) &
GB.NewLine
            ENDIF 'OldSetting[0] <> ""
          ENDIF 'StrExisting <> ""
      LOOP
    CLOSE #confFile
  ENDIF


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 




More information about the User mailing list