[Gambas-user] Strange behavior when file.load() and Error dont Trap

donald at ...1080... donald at ...1080...
Sat Aug 27 02:05:55 CEST 2005


Often i use code like following sample to load filecontent:
---- snipp ----
PUBLIC SUB loadConfig()
  config = NEW String[]
  TRY config = Split(File.Load(ME.appPath & application.Name & ".conf"), 
Chr(10))
  IF ERROR THEN
    saveConfig(TRUE)
    loadConfig
    RETURN
  END IF
END
---- snipp ----

Normaly when the file not exist the Error-trap creates the file with 
default content and reads it again.
Since yesterday the Error-trap does not work, but jumps directly to the 
end and Error has "?error = Syntax error"
Also the file.load() works not anymore correctly even a file exist. 
Strange is that this is not in all functions/subs.
In some it works allways in others never. When i copy the code from one 
wich does not to a working procedure, the code works again there. And 
also the variable (in this case config) can have content but the 
interpreter says it is a "Null object". If i open with Editor there is 
enough content.
Yeah, and i havent changed anything in the procedures between working 
and not.

Thanks for help

Staudi





More information about the User mailing list