hello all,
this should be a basic question for probably the majority of you, but i'm a n00b so here goes.
i'm working with the [plugin~] object and want to use a [popup] object to make it more manageable. so my idea was pretty elementary
[listplugins( ---- [plugin~]-------[route label]-----[append $1(------[popup]
my error is "$1: argument number out of range" so i'm pretty sure it is expecting a float and getting a symbol. i'm sure this is a pretty basic p:d concept but i can't grasp how to send a message with a variable symbol coming in, if that makes sense. i need to be sending [append PhaserII( or something similar. when i [print] the [route label] i get the PhaserII, but it's not passing that along in the append message.
i hope you can help, if my explanation was not too confusing =)
thanks tyler
hi, don't know about [plugin~], but I know some objects sends text as "anything" instead of "symbol" (like [mergefilename] I believe... Try to just insert a [symbol] object between [route label] and [append $1(... Hope I'm right cheers r
Tyler Leavitt a écrit :
hello all,
this should be a basic question for probably the majority of you, but i'm a n00b so here goes.
i'm working with the [plugin~] object and want to use a [popup] object to make it more manageable. so my idea was pretty elementary
[listplugins( ---- [plugin~]-------[route label]-----[append $1(------[popup]
my error is "$1: argument number out of range" so i'm pretty sure it is expecting a float and getting a symbol. i'm sure this is a pretty basic p:d concept but i can't grasp how to send a message with a variable symbol coming in, if that makes sense. i need to be sending [append PhaserII( or something similar. when i [print] the [route label] i get the PhaserII, but it's not passing that along in the append message.
i hope you can help, if my explanation was not too confusing =)
thanks tyler
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Tue, Sep 28, 2010 at 10:50 PM, Tyler Leavitt thecryoflove@gmail.comwrote:
hello all,
this should be a basic question for probably the majority of you, but i'm a n00b so here goes.
i'm working with the [plugin~] object and want to use a [popup] object to make it more manageable. so my idea was pretty elementary
[listplugins( ---- [plugin~]-------[route label]-----[append $1(------[popup]
my error is "$1: argument number out of range" so i'm pretty sure it is expecting a float and getting a symbol. i'm sure this is a pretty basic p:d concept but i can't grasp how to send a message with a variable symbol coming in, if that makes sense. i need to be sending [append PhaserII( or something similar. when i [print] the [route label] i get the PhaserII, but it's not passing that along in the append message.
try [prepend append] instead of [append $1(
Andras
On Tue, 28 Sep 2010, András Murányi wrote:
my error is "$1: argument number out of range" so i'm pretty sure it is expecting a float and getting a symbol.
You precisely never get such an error message for such a mistake. If it says "argument number out of range", it's because the argument number is out of range. This means that $1 doesn't exist in this context. This means that the message has only a selector and nothing else, just like the common messages 'bang', 'close', 'start', 'stop' that are supported by a certain number of object-classes. You wouldn't be able to write it 'symbol close' or 'symbol start' instead : it's just not the same thing.
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On Tue, 28 Sep 2010, Tyler Leavitt wrote:
[listplugins( ---- [plugin~]-------[route label]-----[append $1(------[popup]
my error is "$1: argument number out of range" so i'm pretty sure it is expecting a float and getting a symbol. i'm sure this is a pretty basic p:d concept but i can't grasp how to send a message with a variable symbol coming in, if that makes sense.
You need something like [list] just after [route], because [route] converts the $1 of 'label' into a selector (the header of the message), and [list] converts the selector back into a $1 (except if the header is 'list', 'symbol', 'float', 'bang', or 'pointer').
If you want a no-exceptions, no-verbosity solution, there is [route3] in GridFlow 9.11, which replaces any selector by 'list', and there is also [route2] in GridFlow 8.4 (and later), which preserves all messages as-is.
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC