Article View: comp.sys.next.programmer
Article #1905Re: NeXT Event Loop Question
From: Ron Pomeroy x(Coop)
Date: Mon, 23 Nov 1992 23:59
Date: Mon, 23 Nov 1992 23:59
46 lines
2414 bytes
2414 bytes
In article <1992Nov20.182445.9500@jarvis.csri.toronto.edu>
west@turing.toronto.edu (Tom West) writes:
>> A more general implementation question from a tyro NeXT programmer.
>>
>> I am porting over an interpreter to the NeXT. When execution is
>>called for, the program calls the execution module. It displays
>>output to its output window and occasionally asks for input from
>>the same window. Or at least, it should.
>>
>> I am at a loss as to how I am supposed to:
>> (1) Have the rest of the system keep responding
>> (2) Have the execution wait for key input.
>>
>> Rather kindly, the execution process does come up for air fairly regularly.
>>Looks like: do
>> {
>> running = Execute ();
>> } while (running != FINISHED)
>>
>> On other systems, I just insert a call to the main event loop in the
>>do loop and the application is able (with a little help) to process
>>events. Is there any equivalent to this on the NeXT?
>>
>> Is creating a MACH thread my only alternative? That's going to require
>>much more programming overhead than I would like (to say nothing of the
>>fact that I would have to learn all about threads in about 2 days :-)).
>>Is there a simple method of doing all of this that I've missed?
>>
>> Many thanks in advance.
>>--
>>
>> Tom West
>>
>> west@turing.toronto.edu or "Children of the Blood"
>>tomwest@gpu.utcs.utoronto.ca or -Michelle Sagara
>> west@hsa.on.ca
Just a shot in the dark but...What about using the Subprocess class ? (see
/NeXTDeveloper/Examples/Unix/Subprocess) I used it to talk to a Mathematica
kernel via an external C program (supplied with Mma). Super easy to use.
--
Ronald Pomeroy [Objective-Cruntime: [Smalltalk runtime]];
Advanced Micro Devices [self dream-on];
CAM Applications Group
rpomeroy@aunext1.amd.com (NeXTmail preferred)
Technical Details
Message-ID:
<1992Nov23.235956.22129@dvorak.amd.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!amdcad!dvorak.amd.com!usenetReferences:
<1992Nov20.182445.9500@jarvis.csri.toronto.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!amdcad!dvorak.amd.com!usenet From: rpomeroy@aunext3.amd.com (Ron Pomeroy x(Coop)) Newsgroups: comp.sys.next.programmer Subject: Re: NeXT Event Loop Question Message-ID: <1992Nov23.235956.22129@dvorak.amd.com> Date: 23 Nov 92 23:59:56 GMT References: <1992Nov20.182445.9500@jarvis.csri.toronto.edu> Sender: usenet@dvorak.amd.com (Usenet News) Reply-To: rpomeroy@aunext3.amd.com Distribution: usa Organization: Advanced Micro Devices, Inc.; Austin, Texas Lines: 46