On Sat, 6 Oct 2007, Mirko Maier wrote:
i wonder if it's possible to write an abstraction that has a variable number of inlets or outlets, given as argument. i've tried it with messages like ;pd-[argument file name] inlet 10 10 and so on, but then you always get asked if you want to discard changes, cause of course you shouldn't save these changes in the abstraction. impossible?
afaik, you'd need [initbang], but that object class has not yet been introduced in the main pd, so the best you could do is decide of a maximum number of inlets or outlets, create that many, and use [loadbang] to delete any extraneous inlets or outlets. If you try to create inlets using [loadbang], they will be created too late when you reload the patch, such that every patch that has connections to such objects will load with "connection failed" errors that result in missing wires.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada