send with scripting bug or feature?

Feb 14, 2006 at 12:02am

send with scripting bug or feature?

The attached patch explains the limitations I found with sending
messages with scripting.

Max 4.5.6, OS X 10.4.4

Result when sending the message: error: patcher doesn’t understand “this”,

expected behaviour, just let the patcher accept anything and print the
message. (The same happens with subpatchers by the way.)

Do I need to use the pattrforward object or am I missing something else?
As the manual makes me think the send message should work with any named
object, I assume either its a bug in Max or the docs are wrong.

Stefan

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 30 89 476 402;
#P window setfont “Sans Serif” 9.;
#P newex 69 124 56 196617 print;
#P inlet 69 55 15 0;
#P connect 0 0 1 0;
#P pop;
#P newobj 151 83 50 196617 p printer;
#P objectname p;
#P message 35 57 167 196617 script send p this is a message;
#N thispatcher;
#Q end;
#P newobj 35 83 67 196617 thispatcher;
#P connect 1 0 0 0;
#P window clipboard copycount 3;

[][] [][][] [][] [][][] [][] [][][] [][] [][][]
[][][][][][][][][][][][][][][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—
–_____———–|———-
–(_|_ —-|—–|—–()—
– _|_)—-|—–()———-
———-()————x—-

14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72

#24412
Feb 14, 2006 at 12:20am

Using scripting to send messages to patchers, abstractions and
bpatchers constitutes a special case which is not handled by
scripting at this time. The object which is receiving the message is
the patcher itself, not the first inlet of the patcher box, and it
will work like a kind of “thispatcher” object. You could probably
send a message “script send …” to this patcher object and get it to
forward messages to objects in the subpatch, but I didn’t try it out.

The forthcoming pattrforward object will make your task possible.
Won’t be long now.

jb

Am 14.02.2006 um 01:02 schrieb Stefan Tiedje:

> Result when sending the message: error: patcher doesn’t understand
> “this”,
>
> expected behaviour, just let the patcher accept anything and print
> the message. (The same happens with subpatchers by the way.)
>
> Do I need to use the pattrforward object or am I missing something
> else?
> As the manual makes me think the send message should work with any
> named object, I assume either its a bug in Max or the docs are wrong.

#70540
Feb 14, 2006 at 11:19am

Jeremy Bernstein wrote:
> The forthcoming pattrforward object will make your task possible. Won’t
> be long now.

can’t wait, as the existing pattrforward seems to have the same problem
as the scripting send. (I could happily beta test it, as I just have a
need for it ;-)

If any body gets an award for speed in answering and posting solutions
you’ll get my vote…

Stefan

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72

#70541

You must be logged in to reply to this topic.