[PD] passing multiple arugments to new_ routine
Frank Barknecht
fbar at footils.org
Sun Dec 3 21:52:02 CET 2006
Hallo,
Charles Henry hat gesagt: // Charles Henry wrote:
> okay, Thanks, Frank
> I'll route these questions to the right list, from now on (except this
> message). and I think I uderstand how this will work now.... in this
> example:
> static void *route_new(t_symbol *s, int argc, t_atom *argv)
>
> int argc is the count of the number of arguments, and t_atom *argv
> must be the vector of arguments themselves. (this I'm inferring from
> seeing it in code) I still don't get what t_symbol *s is for, yet.
I think, s holds the name of the object, "route" in this case. IIR
it's required if you construct an object with "A_GIMME"-arguments.
This is taken from IOhannes Externals-Howto:
The arguments of the constructor-method depend on the object-arguments
defined with class_new.
+----------------------------------------------------------+
| class_new-argument | constructor-argument
|
|--------------------+-------------------------------------|
| A_DEFFLOAT | t_floatarg f
|
|--------------------+-------------------------------------|
| A_DEFSYMBOL | t_symbol *s
|
|--------------------+-------------------------------------|
| A_GIMME | t_symbol *s, int argc, t_atom *argv
|
+----------------------------------------------------------+
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list