can I not mix a float and a symbol in a function? when I write a the following function with just the float or just the symbol, it works fine.
otherwise, written as follows, pd crashes.
any help? do I have to use a gimme for that?
thanks -august.
----- void blah_func(t_blah *x, t_float f, t_symbol *s)
class_addmethod(blah_class, (t_method)blah_func, gensym("test"), A_DEFFLOAT, A_DEFSYMBOL,0);
hi august,
t_symbol* args of a method handler are to be declared first -- that is how they are passed to it by the Pd message parser. So, although 'blah' does actually expect messages of the form 'test <float> <symbol>', as specified in class_addmethod(), still the handler's prototype needs to be (note the 'static' spec too):
static void blah_func(t_blah *x, t_symbol *s, t_float f)
Wonder, if this is covered in any docs?
Krzysztof
august wrote: ...
can I not mix a float and a symbol in a function? when I write a the
...
void blah_func(t_blah *x, t_float f, t_symbol *s)
class_addmethod(blah_class, (t_method)blah_func, gensym("test"), A_DEFFLOAT, A_DEFSYMBOL,0);
Krzysytof,
thanks. some ppl had written me off list with the tip.
I still don't understand exactly whay this is....but, now I got it right. And, I didn't find it any docs. maybe im reading the wrong ones.
thanks-august.
hi august,
t_symbol* args of a method handler are to be declared first -- that is how they are passed to it by the Pd message parser. So, although 'blah' does actually expect messages of the form 'test <float> <symbol>', as specified in class_addmethod(), still the handler's prototype needs to be (note the 'static' spec too):
static void blah_func(t_blah *x, t_symbol *s, t_float f)
Wonder, if this is covered in any docs?
On Thu, 25 Sep 2003, august wrote:
Krzysytof,
thanks. some ppl had written me off list with the tip.
I still don't understand exactly whay this is....but, now I got it right. And, I didn't find it any docs. maybe im reading the wrong ones.
which docs ?
Guenter
thanks-august.
hi august,
t_symbol* args of a method handler are to be declared first -- that is how they are passed to it by the Pd message parser. So, although 'blah' does actually expect messages of the form 'test <float> <symbol>', as specified in class_addmethod(), still the handler's prototype needs to be (note the 'static' spec too):
static void blah_func(t_blah *x, t_symbol *s, t_float f)
Wonder, if this is covered in any docs?
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev