diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2004-03-09 12:41:22 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2004-03-09 12:41:22 +0000 |
commit | bc5e203f7787980f65f81ddbf69a619ab34fa85e (patch) | |
tree | 008164a186948e7821e67e5325c0acc3024f6d98 /shared | |
parent | d9072a0e0ecb227c9a42dddf027e29a04f080f4e (diff) |
toxy alpha6
svn path=/trunk/externals/miXed/; revision=1396
Diffstat (limited to 'shared')
-rw-r--r-- | shared/toxy/scriptlet.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c index 4806065..4f4221f 100644 --- a/shared/toxy/scriptlet.c +++ b/shared/toxy/scriptlet.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2003 krzYszcz and others. +/* Copyright (c) 2003-2004 krzYszcz and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ @@ -425,9 +425,13 @@ void scriptlet_qpush(t_scriptlet *sp) strcpy(tail, "]}}\n"); sys_gui(sp->s_buffer); *tail = 0; - /* LATER find out if reply does not fit better inside the query proc */ - sprintf(buf, "after 0 {::toxy::query\n\ - pd [concat %s _rp $::toxy::reply \\;]}\n", sp->s_rptarget->s_name); + /* Could not find anything more flexible, than blocking while waiting + for ::toxy::query to complete. The model case is a Tk dialog + hanging over the arrival of new queries. LATER probably use + a thread-safe replacement of the 'pd' command in order to prevent + competing tcl threads from corrupting the gui-to-pd stream. */ + sprintf(buf, "after 0 {::toxy::query}\nvwait ::toxy::reply\n\ + pd [concat %s _rp $::toxy::reply \\;]\n", sp->s_rptarget->s_name); sys_gui(buf); } } @@ -613,7 +617,7 @@ int scriptlet_rcload(t_scriptlet *sp, t_pd *caller, char *rc, char *ext, if (sp->s_glist) dir = canvas_getdir(sp->s_glist)->s_name; else - dir = ""; + dir = ""; /* which means pwd, usually the same as at Pd startup... */ if ((fd = open_via_path(dir, rc, ext, buf, &nameptr, MAXPDSTRING, 0)) < 0) { result = SCRIPTLET_NOFILE; |