On Tue, 4 Jul 2006, padawan12 wrote:
formal in the common english, not the same as formal parameters of a C function. As in, I'd rather have a name-value hash to pass in :)
You can do that using a messagebox and the comma separator. Using that, you may send a bunch of key-value pairs. The [route] object can then be used to separate the key from the value.
Indeed, but I'm not talking about creation args.
Then what are you talking about? If you're talking about runtime modification of the state of the object, I don't know why that shouldn't also be specifiable as creation arguments, like it is for basic objects like [+]. Saves quite a few [loadbang]s.
But it seems fiddly and difficult because the only mapping between a parameter and its purpose is in the ordering of the list passed. Is there a better way to do this? Better than using routes and unpacks?
There are many kinds of solutions to this. Unfortunately, Miller's structures, which allow naming of arguments in special list-like things, can't do that for messages, and pointer messages are of limited use because they must point to things that belong to patches (there is no automatic deallocation whatsoever except by deleting the patch).
Isn't using [t b f f f a a a a a ] and sending everything in a mixed list, instead of the above, an abuse of [t]? It seems less robust.
I don't understand the use of such a [t]. do you mean [unpack] ?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada