🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #273

(probably) newbie question about keyboard intercepts

#273
From: Dennis Box
Date: Mon, 27 Jul 1992 22:06
25 lines
1434 bytes
Hello all,

I have a NextStep application that occasionally goes into a (long) loop
when a user asks the wrong query of its database. I have been asked
to change this behaviour so that a control-c ejects the program from the
loop, returning control to the main event loop.

My question is, where do keyboard interrupts go, and how does a programmer
detect and use them?  The unix <signal.h> stuff doesn't work, NextStep or
Mach or something obviously grabs signals uses them to its own ends.

Is there a function in NextStep that is as conceptually easy as the 
signal.h stuff ?  Better yet, which appkit object contains the
[actNormallyUntillAControlcIsPressedThenSendMessageTo:myObject] method?
Can I easily roll my own such method?


Thanks in advance,


--
Dennis D. Box          	|   (312) 732-6329 	| "Its FUN to have fun,
My own opinions, not 	| dennis@fnbc.com      	| but you have to know 
my employers. Your 	| ddb@vpnet.chi.il.us	| how!"   -T. Geisel
reactions may vary. 	|  Kill Your Television.  
Technical Details
Message-ID: <1992Jul27.220624.1369@fnbc.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!juliet!news

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!juliet!news
From: dennis@fnbc.com (Dennis Box )
Subject: (probably) newbie question about keyboard intercepts
Message-ID: <1992Jul27.220624.1369@fnbc.com>
Sender: news@fnbc.com
Reply-To: dennis@fnbc.com (Dennis Box )
Organization: First National Bank Of Chicago, Chicago IL, USA
Date: Mon, 27 Jul 92 22:06:24 GMT
Lines: 25