aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-09-16 07:21:49 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-09-16 07:21:49 +0000
commit491fbf15d2eaa60959da1d0d602ec7ad9040a1c5 (patch)
treee0718fb9efb64827d2209e0fe4eb804be3081fcb
parentd2c9616b79f1b01dbeb2586c7cb3d6374c579839 (diff)
[classloader]: added help-patch; check whether pd_objectmaker is there
svn path=/trunk/externals/iem/iemguts/; revision=10287
-rw-r--r--help/classloader-help.pd32
-rw-r--r--src/classtest.c4
2 files changed, 36 insertions, 0 deletions
diff --git a/help/classloader-help.pd b/help/classloader-help.pd
new file mode 100644
index 0000000..7f6ab5e
--- /dev/null
+++ b/help/classloader-help.pd
@@ -0,0 +1,32 @@
+#N canvas 0 0 957 437 10;
+#X obj 90 56 classtest;
+#X text 167 55 check the availability of object-classes;
+#X obj 154 292 classtest;
+#X floatatom 154 318 5 0 0 0 - - -;
+#X text 233 313 1..class exists;
+#X text 233 328 0..class does not exist;
+#X obj 154 226 symbol;
+#X msg 154 106 f;
+#X text 197 107 check for [f] (should always evaluate to 'true');
+#X msg 170 138 niagara;
+#X text 239 164 check for [qwert];
+#X msg 184 167 qwert;
+#X text 70 364 note: "classes" are object that Pd knows about (internals
+\, or externals (with a classloader)). Currently "abstractions" are
+_not_ treated as full-featured classes \, therefore testing for abstractions
+will result in 'false'.;
+#X msg 188 203 classloader-help;
+#X symbolatom 154 259 0 0 0 0 - - -;
+#X text 374 165 (probably this will always evaluate as 'false');
+#X text 226 139 check for [niagara] (evaluates to 'true' if zexy is
+loaded);
+#X text 317 202 check for this abstraction (evaluates as 'false'!)
+;
+#X text 558 292 (c)opyleft 2008 IOhannes m zmölnig @ iem;
+#X connect 2 0 3 0;
+#X connect 6 0 14 0;
+#X connect 7 0 6 0;
+#X connect 9 0 6 0;
+#X connect 11 0 6 0;
+#X connect 13 0 6 0;
+#X connect 14 0 2 0;
diff --git a/src/classtest.c b/src/classtest.c
index b8a8a7b..76f1269 100644
--- a/src/classtest.c
+++ b/src/classtest.c
@@ -41,6 +41,10 @@ typedef struct _classtest
static void classtest_symbol(t_classtest *x, t_symbol*s)
{
t_float result=0.;
+ if(!pd_objectmaker) {
+ pd_error(x, "[classtest]: couldn't find pd_objectmaker!");
+ return;
+ }
if(0!=zgetfn(&pd_objectmaker, s))
result=1.;