home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!psinntp!svc!news
- From: moose@svcdudes.com
- Subject: Re: (probably) newbie question about keyboard intercepts
- Message-ID: <1992Jul28.164914.4863@svcdudes.com>
- Sender: news@svcdudes.com
- Reply-To: moose@svcdudes.com
- Organization: Software Ventures, Inc.
- References: <1992Jul27.220624.1369@fnbc.com>
- Distribution: na
- Date: Tue, 28 Jul 92 16:49:14 GMT
- Lines: 23
-
- In article <1992Jul27.220624.1369@fnbc.com> dennis@fnbc.com (Dennis Box )
- writes:
- > 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.
-
- You can get the next key event with a getNextEvent: method in Application, or
- you can directly querry them using the evs stuff (look in the man pages).
-
- However, NeXT recommends you use the NXUserAborted() function to detect the
- user hitting cmd-.
- --
- Michael Rutman | moose@svcdudes.com
- Cubist | makes me a NeXT programmer
- Software Ventures | maker of MicroPhone II
- #include <std.disclaimer>
-