[Gambas-user] Console questions

Rolf-Werner Eilert eilert-sprachen at ...221...
Fri May 7 12:01:42 CEST 2010


Am 07.05.2010 11:15, schrieb Benoît Minisini:
>> Good morning folks,
>>
>> Just playing around with console applications. Opened a new project and
>> made a "Hello world". There are some questions...
>>
>> About the GUI: When I press the Play button, I can't see anything (of
>> course). But isn't this somewhat unlogical, I mean, I have to make a
>> binary and start the binary from the command line in some terminal. Play
>> should open a terminal, shouldn't it? Or should it simply be disabled?
>>
>
> The output of your program goes to the IDE console. In Gambas 3, you can use a
> true terminal emulator for that instead, if you need.

Unfortunately, due to my too old Linux server here I can neither compile 
nor use Gambas3 yet.

>
>> Is there something like CLS in a commandline app? How do other programs
>> - like "top" for instance - handle this?
>
> Special terminal commands like that are handled by special character sequences
> that depends on the type of the terminal.
>
> There is a library on Unix named NCurses that abstracts that (with it you will
> have a "CLS" command for any kind of terminal), but there is no support for it
> in Gambas at the moment. So you have to send the special character sequences
> by yourself.

Aaah - I remember vaguely I ran into this a long time ago.

>
> If someone wants to make a useful component in C/C++, NCurses is a good start!
>
>>
>> If the application is opened in a terminal window within the GUI, the
>> window can be changed during operation. Clever commandline applications
>> will adapt their row/height ratio to this. How can I read the number of
>> rows and columns?
>
> This is handled by the ncurses library too.
>
> Regards,
>

Anyway, thanks a lot for the information. At least now I know where to 
look for the details :-)

Regards

Rolf





More information about the User mailing list