[Gambas-user] A few questions

Tobias Boege taboege at ...626...
Wed Feb 27 18:15:36 CET 2013


On Mon, 25 Feb 2013, Astrostream wrote:
> Hello Everyone,
> 
> I am new to gambas but not to programming, and I just have a few questions
> that I cannot find the answers to. Any ideas or help that can lead to some
> answer would be great.
> 
> 1) a) Am i able to call a function from bash of a running gambas program?
> (want to be able to allow connections to my program(done) and have external
> tools pipe information to the gambas program then to the connecting client)
> 

You can start a bash process from inside your Gambas program and make it
execute a script. Using the returned 'Process' object, you can pass data to
this bash.

I suppose that you look into the 'Console' example shipped with Gambas to
get some basics about the Process class.

> 1) b) Can pass a value to a dead gambas program (like a bash script)
> 

First of all: what's a 'dead' Gambas program? And how does a bash script
come into the picture?

> 2) Can i create a man page for my program? If so how?

That's not dependent on Gambas at all. You create a manpage like everyone
else does - with or without Gambas.

> 
> 3) How can i catch a close event from when a user closes a window(right
> click taskbar close or alt+f4's it? (Currently when a user closes a window
> only half the program stops and i would like to catch and quit the entire
> program).
> 

Write an event handler 'Public Sub Form_Close()'. This one is executed when
your window is closed.

Regards,
Tobi




More information about the User mailing list