If you are already putting the "literal" argument in the creation args, then why not just make another creation argument that shadows the dollar argument?

Mike


On Mon, Sep 29, 2008 at 10:56 AM, IOhannes m zmoelnig <zmoelnig@iem.at> wrote:
hi

we are having a hard time with the following problem:
we want to create an object that has a variable number of iolets, based
on the $args available.
e.g. [myobj $1] should create an object with a single inlet
[myobj $3] should create an object with 3 inlets.

the number of iolets depends on the literal value of the dollargs, not
on the expanded values!

you can think of this like an [expr] object, but using "$2" directly
instead of "$f2".

now the problem is that i haven't found a way how to access the raw
object arguments in the constructor (new-routine) of the object.

it is simple to do so _after_ the constructor (by accessing the binbuf),
but then it is too late.
the raw args are not available yet within the constructor (it is filled
right afterwards in the canvas_objtext() routine)
the reason is obvious, as there is no memory allocated to store the
binbuf before a call to pd_new()

unfortunately the insight of why this is like it is does not really help me.

does anybody (miller?) knows a way (or trick) how to access the raw
arguments within the constructor (or _very_ shortly afterwards: that is,
before the next object is created)

else i would like to file a feature request to fill the information i
need within the pd_new()

any thoughts?


fgamrsd
IOhannes

_______________________________________________
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev



--
Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician