Hi list,
I learned some more about Pd's message dispatching system while
adding jump-on-click mouse clicks and bar graphs to "Put" menu arrays:
1) For type-checked args in class_addmethod, you can specify them in any
order.
2) Pd re-arranges them, putting the symbol/pointer args first and the
float args last.
3) In the function for the method you have to specify the args in the
order from #2.
I see graph_array makes use of these in g_graph.c: the args are symbol
float symbol float float, but the function receives the symbols as the
first two args.
Was this done to fix a bug or keep something backwards compatible? Are
there other methods done this way? In general I think it's much better
to specify type-checked args in the same order they'll be received by
the function, meaning symbols/pointers then floats. Otherwise it makes
it more difficult to track down errors.
-Jonathan