|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 17:10:12
|
Caveat: I don't really understand how your new terminal type is supposed to work. So maybe I have the wrong end of the stick here... On Friday 24 June 2005 11:45 am, Timoth=C3=A9e Lecomte wrote: >=20 > As far as I understand, this would be perfect if I had not to use a=20 > separate thread for my terminal. Indeed, I want to send a command from=20 > the terminal (through a menu for example) to gnuplot. I use events=20 > defined in mouse.c, and more precisely a "command" event (which doesn't=20 > seem to be used very often, or maybe in OS/2 only). The do_event(event)=20 > is executed in my gui thread. When an error appears on the command, we=20 > obtain a longjump which is invalid for *this* gui thread... and it ends=20 > with a segmentation fault. I would think the proper fix is to re-initialize the longjump at the start of each thread creation. Then if you get an error it will jump to a per-thread error handler and exit the thread cleanly. > Another solution would be to build the terminal as a separate process,=20 > like x11 or os/2 ones. But I think it's not an optimal design. > So I would be pleased if somebody can give me a tip in order to deal=20 > with this issue ;-) . I might understand better if you would briefly describe the flow of control you are trying to achieve. What does the new terminal type do that existing terminals do not handle already? Is the user expected to run gnuplot from a command line, but when 'set term wxwidgets' is selected a=20 separate control window appears? Or does the user run a wrapping program that executes gnuplot underneath with the terminal pre-set to communicate w= ith the wrapping layer? =20 If it's the latter, then I'm not sure you even need a new terminal type. You may be able to use 'set term x11' and direct the output to an embedded panel of the wrapping program (see patchset #1027032). I'm not saying this is the best thing to do, but I point it out as a possibility. =20 =2D-=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |