Perl-Sensitive Sunglasses | |
PerlMonks |
Win32::Console Input Buffer Problemby Android 18 (Novice) |
on Jul 21, 2002 at 21:25 UTC ( [id://183875]=perlquestion: print w/replies, xml ) | Need Help?? |
Android 18 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to very simply get key press input from the input buffer using Win32::Console. For some reason, the Input() method always returns a list of one element whose value is "" rather than a list describing the next event. Then when the program exits, all the keypresses are dumped to the command line at once. I've been trying an assortment of different things with the Alloc(), Free(), Select() and Mode() methods. I've read microsoft's documentation on the subject but still am stuck.
On my scratchpad is the source to the module where I'm using Win32::Console right now. Eventually, my whole program will have lots of different modules that have their own Win32::Console objects. Each module will be called to do a specific task. for example this module is going to be a file selector. Anyway, the object of _my_ module is created in the main program with its new() method. After which I call Start() and Title() to set up some stuff and run it with it's Run() method. You can see how Run() calls the MainLoop() and, when I get it working, eventually it'll return a path to a file they select. The problem is in the main loop. If anyone can help me please do. I'm having trouble finding good documentation and examples.
Back to
Seekers of Perl Wisdom
|
|