Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Rainer Staringer
Mon, 12 Oct 1992 08:49
AppKit event loop & MathLink interaction
Author: Rainer Staringer
Date: Mon, 12 Oct 1992 08:49
Date: Mon, 12 Oct 1992 08:49
27 lines
1746 bytes
1746 bytes
I am using Mathematica via the MathLink protocol in an IB palette, and I found the following strange interaction between the event loop and the MathLink functions: If I call the MLStart() function in -appDidInit: or anywhere after [NXApp run] is called, it will work (sort of) but the first call to MLNewPacket() will hang forever. If I move the MLStart() call into the main() function and call it before [NXApp run] everything will work. But of course this is not possible in an IB palette (at least if you want it to work in test mode), so I would like to know what the cause could be for this sort of failure. I think MLStart does not much more than popen() does, i.e. open a pipe, fork, and exec. MLNewPacket() does a select() to check if the pipe is still there, then a read(). What does [NXApp run] do that might cause this to fail? I am also using the Sybase DB library in the same palette, if that matters. I am pretty sure that my MathLink code is correct because I basically copied WRI's sample front end program. I am doing this under 2.1/2.2; I haven't tried it under 3.0 yet. Thanks in advance for any pointers! Rainer -- Rainer Staringer | rainer@fml.tuwien.ac.at Financial Markets Lab, TU Vienna | +43 (1) 58801/8138
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads