Yeah, I see what you're trying to do. You can use \\ to make a single \ as the \ is normally the first part of a special character constant (e.g. \t makes a Tab character). I think you can just wrap file/dir names with spaces in them in quotes for use in bash scripts.
Oh, and my Gambas doesn't crash with the code exactly as you had it. As Benoit experienced, it just doesn't compile, same for me (compile error is"Bad character constant"). Kind regards, Caveat On 15/05/13 01:17, Charlie wrote: > Hi Benoit, > > It may, or may not, be good syntax but press F5 and Gambas crashes. You can > not compile it because Gambas crashes. > > The purpose of the code was to change "dir" string into a form tha BASH would > accept from Shell command if there are spaces in the "dir" string. > > I am not an expert in any of this. I am just tring to help by pointing this > issue out. If it is a syntax error Gambas should detect this and not crash. > > Regards, > > Charlie. > > > > > > Sent from Charlie's Samsung tablet"Benoît Minisini [via Gambas]" > <ml-node+s8142n41946...@n7.nabble.com> wrote:Le 14/05/2013 18:09, Charlie a > écrit : > >> Hi all, >> >> You need one *Button* and one *DirChooser* on your form >> I have reduced code to the following to emulate this bug I am getting: - >> '********************************************************* >> Public Sub _new() >> End >> >> Public Sub Form_Open() >> End >> >> >> Public Sub Button1_Click() >> >> Dim SDir As String >> Sdir = DirChooser1.SelectedPath >> SDir = Replace(SDir, " ", "\ ") > This line is not syntactically correct ("\ "). Please provide a project > or at least code that compiles! > > Regards, > ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user