Hi dev list,

Question about the syntax of creation arguments and type checking. I was
working on an object yesterday, with the following setup line:

grab_class = class_new(s, (t_newmethod)grab_new, (t_method)grab_free,
        sizeof(t_grab), 0, A_DEFFLOAT, A_DEFSYM, 0);

I'd assumed that it would require grab_new() to have this declaration to
match the order float, symbol as in class_new:

static void *grab_new(t_floatarg f, t_symbol *s);

but it only worked with the reverse:

static void *grab_new(t_symbol *s, t_floatarg f);

We ended up using A_GIMME, but for the future, is there a way to know the
order of parameters passed to the creator?

Thanks,
Matt
_______________________________________________
Pd-dev mailing list
[email protected]
https://lists.puredata.info/listinfo/pd-dev

Reply via email to