XML Feeds

.

[javascript-dev] Connect existing object to scripted one

Emmanuel Jourdan c74-mailinglists at e--j.com
Sun Jun 10 11:46:04 MDT 2007


On 10 juin 07, at 19:37, Frans-Jan Wind wrote:

> function bang()
> {
> 	if( theunpack )
> 	{
> 		this.patcher.remove( theunpack );
> 	}
> 	theunpack = this.patcher.newdefault( 200, 200, 'unpack', 0, 0);
> 	this.patcher.connect( thedata, 0, theunpack, 0 );
> }

The problem is that thedata is not a MaxObject. It's maybe easier to  
use the script name like that:

function bang()
{
	if( theunpack )
	{
		this.patcher.remove( theunpack );
	}
	theunpack = this.patcher.newdefault( 200, 200, "unpack", 0, 0);
	theunpack.varname = "theunpack";
	this.patcher.message("script", "connect", "thedata", 0, "theunpack",  
0 );
}

HTH,
ej


More information about the javascript-dev mailing list