Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!agate!shelby!neon!cm-next-9!grd From: grd@cm-next-9.Stanford.EDU (glen diener) Newsgroups: comp.sys.next Subject: Re: Using Interface Builder from LISP Message-ID: <1990Jun6.034626.21871@Neon.Stanford.EDU> Date: 6 Jun 90 03:46:26 GMT References: Sender: news@Neon.Stanford.EDU (USENET News System) Distribution: usa Organization: CCRMA, Stanford University Lines: 31 In article stuart@previous.ADS.COM (Stuart Crawford) writes: > >I'm porting a rather large LISP application to the NeXT and, of >course, am spending most of my time on the interface. Here is my >problem: > >Since (send NXApp "run") doesn't return, how can I interrupt the >application to get back to the LISP top level? Control-C doesn't >help. I've resorted to putting a button in my application that runs a >method that contains (break), but I'm sure there's a more elegant way >to handle it. A related problem is that when I quit from the >application using the "quit" item in the main menu LISP quits as well. >Thanks in advance. > >Stuart -sending the message [NXApp stop: sender] will return control to whatever called [NXApp run]...in your case, the top level LISP listener. You can restart the application loop with (send NXApp 'run) as many times as you want. The quit command normally sends [NXApp terminate: sender]... which exit()s. You could redefine the terminate method in NXApp to do something different, or simply change the action of the quit menu item... [menu addItem: "Quit" action:@selector(myTerminate:) keyEquivalent:'q'] ...to call your custom terminate method. Hope this helps. -glen diener grd@cm-next-9.stanford.edu