Forums > Javascript

messnamed() NOT WORKING!

October 14, 2006 | 1:42 am

Hi,

I want to send the message "setcell 0 0 plane 2 val 255" to a jit.matrix.

When I try:
messnamed("recieveObjectName", "setcell 0 0 plane 2 val 255")

_OR_

g = new Global("xyz")
g.message = "setcell 0 0 plane 2 val 255"
g.sendnamed("recieveObjectName", "message")

I get an error in the Max window saying that jit.matrix doesn’t understand… And yet if I make a message box with the exact message and send it in Max, of course it works.

WHY?

Is there no way to send long messages to objects from the js object?

If not… There should be!

Brutus


October 14, 2006 | 3:41 am

It works fine.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 247 140 64 196617 fromsymbol;
#P newex 248 117 134 196617 receive recieveObjectName;
#P newex 244 167 55 196617 jit.matrix;
#P connect 2 0 0 0;
#P connect 1 0 2 0;
#P window clipboard copycount 3;

-A


October 14, 2006 | 2:28 pm

Andrew,

>It works fine.

Does it???

(Patch is Attached + .js file is on line and at the end of this post)

In that case maybe you explain to me why I get this error in the Max window:

error: lcd: doesn’t understand message linesegment 5 5 50 50.

Is this a MacIntel thing?

Let me know,

P

Here is the one line .js file that should be called test.js:

messnamed("lcd", "linesegment 5 5 50 50")


October 14, 2006 | 2:32 pm

Try

messnamed ("lcd", "linesegment", 5, 5, 50, 50);

jb

Am 14.10.2006 um 16:28 schrieb Brutus:

> messnamed("lcd", "linesegment 5 5 50 50")


October 14, 2006 | 2:38 pm

Many Thanks Jeremy!

I guess I missed that in the Javascript manual…

;)


Viewing 5 posts - 1 through 5 (of 5 total)