aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdlib.tcl2
-rw-r--r--tcl_class.cxx6
-rw-r--r--tcl_extras.h8
3 files changed, 9 insertions, 7 deletions
diff --git a/pdlib.tcl b/pdlib.tcl
index 0a22957..c20f822 100644
--- a/pdlib.tcl
+++ b/pdlib.tcl
@@ -110,7 +110,7 @@ namespace eval ::pd {
# class level dispatcher (sort of class constructor)
proc ::$classname {self args} "
if \$::verbose {::pd::post \[info level 0\]}
- ::pd::call_classmethod $classname \$self 0 constructor {*}\$args
+ ::${classname}_constructor \$self {*}\$args
# object dispatcher
proc ::\$self {inlet selector args} \"
if \\\$::verbose {::pd::post \\\[info level 0\\\]}
diff --git a/tcl_class.cxx b/tcl_class.cxx
index fb7131e..d5e9b77 100644
--- a/tcl_class.cxx
+++ b/tcl_class.cxx
@@ -5,7 +5,7 @@
using namespace std;
-static long objectSequentialId = 0;
+static unsigned long objectSequentialId = 0;
map<string,t_class*> class_table;
map<string,t_pd*> object_table;
@@ -29,6 +29,7 @@ t_class* tclpd_guiclass_new(const char* name, int flags) {
wb->w_visfn = tclpd_guiclass_vis;
wb->w_clickfn = tclpd_guiclass_click;
class_setwidget(c, wb);
+ return c;
}
t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at) {
@@ -37,7 +38,7 @@ t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at) {
t_tcl* self = (t_tcl*)pd_new(qlass);
self->ninlets = 1 /* qlass->c_firstin ??? */;
char s[32];
- sprintf(s, "tclpd:%s:x%x", name, objectSequentialId++);
+ sprintf(s, "tclpd:%s:x%lx", name, objectSequentialId++);
self->self = Tcl_NewStringObj(s, -1);
Tcl_IncrRefCount(self->self);
object_table[string(s)] = (t_pd*)self;
@@ -139,4 +140,5 @@ void tclpd_guiclass_vis(t_gobj* z, t_glist* glist, int vis) {
}
int tclpd_guiclass_click(t_gobj* z, t_glist* glist, int xpix, int ypix, int shift, int alt, int dbl, int doit) {
+ return 0;
}
diff --git a/tcl_extras.h b/tcl_extras.h
index 3400b7e..602ceef 100644
--- a/tcl_extras.h
+++ b/tcl_extras.h
@@ -1,7 +1,7 @@
#include "m_pd.h"
-#include "m_imp.h"
+//#include "m_imp.h"
#include "g_canvas.h"
-#include "s_stuff.h"
+//#include "s_stuff.h"
#include <tcl.h>
@@ -48,7 +48,7 @@ extern "C" void tclpd_setup(void);
void tclpd_interp_error(int result);
/* tcl_class.cxx */
-t_class* tclpd_class_new(char* name, int flags);
+t_class* tclpd_class_new(const char* name, int flags);
t_class* tclpd_guiclass_new(const char* name, int flags);
t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at);
void tclpd_free (t_tcl* self);
@@ -71,7 +71,7 @@ int tclpd_guiclass_click(t_gobj* z, t_glist* glist, int xpix, int ypix, int shif
extern "C" int tclpd_do_load_lib(t_canvas* canvas, char* objectname);
/* pd loader private stuff: */
typedef int (*loader_t)(t_canvas *canvas, char* classname);
-//extern "C" void sys_register_loader(loader_t loader);
+extern "C" void sys_register_loader(loader_t loader);
extern "C" int sys_onloadlist(char* classname);
extern "C" void sys_putonloadlist(char* classname);
extern "C" void class_set_extern_dir(t_symbol* s);