[PD] Value vs receive names

Krzysztof Czaja czaja at chopin.edu.pl
Tue Oct 16 14:06:47 CEST 2001


hi,

the quick fix is attached, but I cannot guarantee there are no
side-effects...

Krzysztof

Peter Lunden wrote:
> 
> I find it stange that if a value box has the same name as a recieve then
> there will be an error message "error: value: no method for 'float'"
> when sending values to the receiver, is this a bug or a feature?
...
-------------- next part --------------
--- x_connective.c~	Mon Sep 24 23:54:40 2001
+++ x_connective.c	Tue Oct 16 13:55:00 2001
@@ -1387,6 +1387,11 @@
     value_release(x->x_sym);
 }
 
+static void vcommon_float(t_vcommon *x, t_float f)
+{
+    x->c_f = f;
+}
+
 static void value_setup(void)
 {
     value_class = class_new(gensym("value"), (t_newmethod)value_new,
@@ -1397,6 +1402,7 @@
     class_addfloat(value_class, value_float);
     vcommon_class = class_new(gensym("value"), 0, 0,
     	sizeof(t_vcommon), CLASS_PD, 0);
+    class_addfloat(vcommon_class, vcommon_float);
 }
 
 /* -------------- overall setup routine for this file ----------------- */


More information about the Pd-list mailing list