XML Feeds

.

[javascript-dev] Handling coll objects from inside js objects

Patrick Delges pdelges at radiantslab.com
Mon May 26 03:51:59 MDT 2008


On 26 mai 08, at 11:02, emerson wrote:

> be made on the input sequence, I want to use javascript objects.  
> Could anyone give me ideas or inform me about a method for how I can  
> reference/handle the data structure in "coll"s using js code, within  
> js objects at various parts of patches?


See the Maxobj section in JavascriptingMax.pdf.

An easy way would be to be to give your [coll ] instance a name (let  
say "mySuperColl_hider"), define in your js file a loadbang function  
like this:

var myColl;
function loadbang ()
{
	myColl = this.patcher.getnamed("mySuperColl_hider");
}

and send messages to the coll like this:

function foobar()
{
	...
	myColl.message (...);
	...
}

If you need to get values, you may have a look at this thread:

http://www.cycling74.com/forums/index.php?t=msg&goto=112604&rid=0&S=fa8a096b2d60ea595614c0c356155f31&srch=straightforward#msg_112604

I know Jeremy B. compiled  a [js] version with a get function, but I  
dont know wether it has made its way to a public release...

In Max5, things may have changes, but I couldn't find any serious  
documentation yet.

p

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl
http://www.crfmw.be/max



More information about the javascript-dev mailing list