[Gambas-user] Application_Read does react only once

Rolf-Werner Eilert eilert-sprachen at ...221...
Fri Mar 4 10:32:11 CET 2011


Am 04.03.2011 01:06, schrieb Benoît Minisini:
>>> Hi folks,
>>>
>>> This is a small project I have been circling around for about a year or
>>> so. It would be a simple command line application that waits for and
>>> evaluates every keystroke you make.
>>>
>>> Some of you were so kind to point me to Application_Read to achieve
>>> that, but I found it only gives one single keystroke (a Return) and
>>> (seamingly) is never called again. To make things short, this is the
>>> core of my application so far:
>>>
>>> ...
>>>
>>> So, why does "hello world" only appear one single time (after a first
>>> Return), and why will I never read " : " but only the letters of the
>>> keys pressed?
>>>
>>> On my machine, the whole thing runs within "Konsole" on a graphical
>>> screen, but I think that will not really make a difference, will it?
>>>
>>> Thanks for your help!
>>>
>>> Regards
>>>
>>> Rolf
>>
>> Please send a complete project each time you report a bug, even if it is a
>> small one that looks evident for you.
>>
>> Regards,
>
> That code works perfectly in real situation (inside a terminal). But not
> correctly from the IDE, as apparently stroke typed from the IDE console window
> are not received immediately by the debugged application. You must type a lot
> of characters before.
>
> Regards,
>

Ok, that explains it. What a pitty... All I would need for my idea is a 
reliable single key reader (such as getch() in ncurses) and the chance 
to find out the terminal dimensions.

So I'll try to get it done with ncurses.

Regards

Rolf




More information about the User mailing list