[Gambas-user] Possible bug
Caveat
Gambas at ...1950...
Wed May 15 01:32:28 CEST 2013
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+s8142n41946h68 at ...3046...> 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,
>
More information about the User
mailing list