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?
--PLu
#N canvas 362 99 217 159 10; #X obj 26 29 r XX; #X floatatom 75 29 5 0 0; #X obj 75 59 s XX; #X obj 26 58 v XX; #X connect 0 0 3 0;
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?
...
--- 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) +{
+}
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);
}
/* -------------- overall setup routine for this file ----------------- */
hi,
I checked value in max, and of course value names live in a different namespace than send/receive names. Thus the float method of vcommon class should not set the variable (as in my fix), but instead, should be a nop, if we care of maintaining some degree of compatibility.
But anyway, value in max stores any message, this is the main difference...
Krzysztof
Yes... there's a big difference between MaxAPd, which is that in Max you can only bind one object to any given name; in Pd a table, a send/receive pair, and a "value" (and other things) can all share a symbol. In Max, there was a hack whereby "value" and "send/receive" actually shared one named object between the three of them. So the whole thing was a special case which didn't extend, for instance, to tables.
The "correct" thing might have been to provide different namespaces to each type of object. In the way it is currently, the best thing is to avoid having different kinds of objects sharing the same name. (It's probably bad style anyway...)
cheers Miller
On Wed, Oct 17, 2001 at 12:43:30PM +0200, Krzysztof Czaja wrote:
hi,
I checked value in max, and of course value names live in a different namespace than send/receive names. Thus the float method of vcommon class should not set the variable (as in my fix), but instead, should be a nop, if we care of maintaining some degree of compatibility.
But anyway, value in max stores any message, this is the main difference...
Krzysztof