[Gambas-devel] New preversion of gambas-0.73

Fabien Bodard Gambasfr at ...4...
Tue Dec 2 23:57:59 CET 2003


Le Lundi 1 Décembre 2003 22:11, daniel a écrit :

Hi daniel :



> Another bug, today I'm the Gambas nightmare :)
>
> I've erased $HOME/.gambas directory, and then ,when I try to start
> Gambas, and then "Open project...", file selector, places me on
> root "/" directory (OK), I enter into "/home" (OK), and when I try to
> enter in "/home/daniel" the program fails:
>
> FSupSelector.Fill_Explorer.210: #32: Bad string conversion


First add this in the header of the fill_explorer sub :

IF NOT Exist(sPath) THEN RETURN




For benoit :

GGRRRRR i've found ! the second bug ... it because benoit have change, the 
Conv$ process to an automatical one ... :-(


* Files instructions like OPEN, KILL, MKDIR, etc. now convert automatically 
the
  file name from UTF-8 to system charset. This implies that gambas source code 
files
  must be written in UTF-8 !






The error is in the Fill_tree sub....


PRIVATE SUB Fill_Tree(sPath AS String)

  DIM sDir AS String
  DIM arFile AS NEW String[]
  DIM scDir AS String
  DIM sSeq AS String
  'Message("tree " & sPath)
  sSeq = Left(sPath)
  sPath = Mid(sPath,2)
  
  IF NOT Exist (sPath) THEN RETURN
  IF NOT TreeExplorer.Exist(sSeq & sPath &/ "child") THEN RETURN
  TreeExplorer.Remove(sSeq & sPath &/ "child")


  *************************** ERROR LOCATION ******************************
  TRY sDir = Dir(sPath)
  
  WHILE sDir
   
    
    IF IsDir(sPath &/ sDir) THEN
      Stat(sPath &/ sDir)
      IF File.Hidden AND NOT ShowHidden THEN GOTO JumpDir
      arFile.add(sDir)
    ENDIF
JumpDir:
    sDir = Dir()
  WEND
  
**********************************************************************************
 There is a problème with some spécific directories or files name that have 
spécial letter like 'débéreêrelaâ'
but i don't know why ..... 

I can't made a IsDir, or an Stat

I've tryed to delete all my conv line to see... but no change any more... 
Maybe this error come from you change in the intepreter.

****************************************************************************
 arFile.Sort
  FOR EACH sDir IN arFile
    scDir = Conv$(sDir, System.Charset, Desktop.Charset)
    IF Exist(sPath &/ sDir &/ ".project") THEN
      TreeExplorer.add(sSeq & sPath &/ sDir, scDir,imgTreeProject,sSeq & 
sPath)
      IF HaveDirChild(sPath &/ sDir) THEN TreeExplorer.add(sSeq & sPath &/ 
sDir &/ "child", "",imgTreeDir,sSeq & sPath &/ sDir)
      
    ELSE
      IF AccessTest(sPath &/ sDir) THEN
        TreeExplorer.add(sSeq & sPath &/ sDir, scDir,imgTreeDir,sSeq & sPath)
        IF HaveDirChild(sPath &/ sDir) THEN TreeExplorer.add(sSeq & sPath &/ 
sDir &/ "child", "",imgTreeDir,sSeq & sPath &/ sDir)
      ELSE
        TreeExplorer.add(sSeq & sPath &/ sDir, scDir,imgTreeNoDir,sSeq & 
sPath)
        
      ENDIF
        
    ENDIF
  NEXT
  CATCH
  Message ("erreur " & Error.text)
  PRINT "erreur     " & spath &/ sdir
  QUIT
  
END


Fabien




More information about the Devel mailing list