[Gambas-user] Relative paths in a component

Adrien Prokopowicz adrien.prokopowicz at ...626...
Sun Apr 22 12:57:52 CEST 2012


Hi Benoît,

In gb.xml, in XmlReader, i'm loading a file through the Open instruction :

Public Sub Open(path As String)
  
  Dim fichier As File

  fichier = Open path For Input
  Me.InputStream = fichier
  
End

But when path is a relative path, it refers to the project of the component, 
not to the user's project. So the interpreter doesn't find the file, and raises 
an error.

How can I make relative paths referring to the good file ?




More information about the User mailing list