Re: Newby with a Ctrl-C problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

>I *must* be able to trap and handle Ctrl-C within my application -
>
>Using allow_break(TRUE) causes the app. to exit to MS-DOS as soon as
>Ctrl-C appears.
>
>Using allow_break(FALSE) prevents the exit to MS-DOS but get_key()
>doesn't return anything so I can't tell that Ctrl-C has turned up and
>handle it sad
>
>Anyone got any suggestions / solutions ?

Ralf's idea should work, but it may not work elegantly enough, depending
on the application. (You'll still see a ^C appear in your program.)

Another solution, used by David Cuny in EE, which comes with his TextGUI
toolkit, may work better, but the code is integrated into the toolkit, so
it will have to be extracted. Maybe David could explain further, or I
could dig out the code. (You should get the toolkit anyway, the editor is
more like DOS Edit, so you may feel more comfortable with it.)

The file is KEYS.E, but it has other stuff in it. (It uses some mouse
stuff, and other things from EE in it.) It has a routine in it that gets
the keys and returns CTRL-C safely.

I don't have time right now, but if you want, I can dig out the code for
getting the keys and wrap them up in a .E file, with docs and stuff later
on (Hopefully tonight, with Monday being the latest, depending on how
busy I am). (Or David, you could jump in and get the needed code and give
it to John sooner. blink


___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
or call Juno at (800) 654-JUNO [654-5866]

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu