[Gambas-user] Running programs from terminal and by double clicking.

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jan 2 22:20:56 CET 2012


Sorry, not Ubuntu! I'm using Xubuntu.

Jussi



On Mon, Jan 2, 2012 at 20:24, Jussi Lahtinen <jussi.lahtinen at ...626...>wrote:

> Hi!
> Strange problem. For some reason I'm not able to start child processes if
> the parent program is launched by double clicking.
> This is very specific issue. Firstly child program must be made with
> gambas, and it must be evoked with certain command.
>
> Here is code (also ready project is attached) to test the problem:
>
> Private hProcess As Process
>
> Public Sub Button1_Click()
>
>   Dim sTmp As String = Application.Path &/ "ExecBug2.gambas"
>
>   If Exist(sTmp) = False Then Error.Raise("Binary file is missing!")
>
>   hProcess = Exec ["gbr3", sTmp] For Input As "Process"
>
>   Wait 1
>
>   If hProcess.State = hProcess.Running Then
>     Message("Project is started from terminal!")
>   Else
>     Message("Project is started by double clicking with mouse!")
>   Endif
>
> End
>
>
> Steps to reproduce the problem:
>
> 1. Open the code in IDE and compile two different executables from it,
> name them ExecBug.gambas and ExecBug2.gambas.
> 2. Make sure the executables are in same folder!
> 3. Double click on ExecBug.gambas and read the message; it should tell you
> how you started ExecBug.gambas.
> 4. Open terminal to the folder and type "./ExecBug.gambas".
> 5  Now you should have two instances of this program (ExecBug.gambas and
> ExecBug2.gambas) and message should tell you it is started from terminal.
>
>
> This is new behaviour, but I don't know when this exactly emerged. I would
> say month ago everything worked.
> Am I missing something? Problem with my machine?
>
> Can someone confirm?
> Thanks!
>
> Jussi
>
> Gambas 3 @ Ubuntu 11.10 64bit
>
>
>
>
>
>
>
>
>



More information about the User mailing list