diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2009-08-29 18:48:03 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2009-08-29 18:48:03 +0000 |
commit | ba069019909c54f3c90b7fec51c145f88cf99e3e (patch) | |
tree | 7c4c145db150737cff0a928452920af64670d799 /tcl_setup.cxx | |
parent | 8b65741620bae448b96eb8ce59b85a7b1bb36c44 (diff) |
add proxy inlet. still some unresolved TypeError, will continue the work tomorrow
svn path=/trunk/externals/tclpd/; revision=12134
Diffstat (limited to 'tcl_setup.cxx')
-rw-r--r-- | tcl_setup.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tcl_setup.cxx b/tcl_setup.cxx index 28d6778..15eb3c3 100644 --- a/tcl_setup.cxx +++ b/tcl_setup.cxx @@ -15,6 +15,8 @@ void tclpd_setup(void) { post("Tcl loader v0.1.1 - 08.2009"); + proxyinlet_setup(); + tcl_for_pd = Tcl_CreateInterp(); Tcl_Init(tcl_for_pd); Tclpd_SafeInit(tcl_for_pd); @@ -51,3 +53,18 @@ void tclpd_setup(void) { sys_register_loader(tclpd_do_load_lib); } + +void tclpd_interp_error(int result) { + post("Tcl error: %s", Tcl_GetStringResult(tcl_for_pd)); + post(" (see stderr for details)"); + + fprintf(stderr, "------------------- Tcl error: -------------------\n"); + Tcl_Obj* dict = Tcl_GetReturnOptions(tcl_for_pd, result); + Tcl_Obj* errorInfo = NULL; + Tcl_Obj* errorInfoK = Tcl_NewStringObj("-errorinfo", -1); + Tcl_IncrRefCount(errorInfoK); + Tcl_DictObjGet(tcl_for_pd, dict, errorInfoK, &errorInfo); + Tcl_DecrRefCount(errorInfoK); + fprintf(stderr, "%s\n", Tcl_GetStringFromObj(errorInfo, 0)); + fprintf(stderr, "--------------------------------------------------\n"); +} |