Forums > Javascript

Sending a message to a newdefault

October 23, 2013 | 2:21 pm

Hey folks,

I have created a Max object using "newdefault" from my javascript. I want to then send a message to this new object. I am using the following function…

maxObj.message("list", "test message");

This seems to generate a script error. How do I send a MaxObject a message?
Is there a way I can specify a inlet number as well?

Anthony


October 24, 2013 | 7:10 am

how about maxObj.message("test", "message")? A list should start by a number.


October 24, 2013 | 7:38 am

Hey Emmanuel, thanks for our response. I tried your suggestion, it compiles fine but I get the following error…

patcher: doesn’t understand "test"

The patcher I instantiated with "newdefault" is an abstraction of my own. Can I send the message to an inlet instead so that I can handle the message in my abstraction?


October 24, 2013 | 9:28 am

Patcher are special…

This is not pretty but you can do something like this.

Attachments:
  1. Archive1.zip

October 24, 2013 | 10:13 am

Ugh, not pretty at all…

So are you saying there is no way to send a user defined message to a MaxObj via javascript?


October 24, 2013 | 1:13 pm

No you can send a message to MaxObject but not to a patcher ;-)

Attachments:
  1. Archive2.zip

October 24, 2013 | 2:18 pm

I see, I seem to be confusing an abstraction with an object. Will have to think about this some more.


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