Re: jscript on linux?

Date : Wed, 22 Mar 2006 17:00:50 -0500
To : XSI(at)Softimage.COM
From : David Gallagher <daveg(at)blueskystudios.com>
Subject : Re: jscript on linux?

Brilliant!
Great info. Thanks Brad!

brad wrote:
I'm not sure, but I think it's the version of jscript being using by the ActiveX layer provided by MainWin, which is version 3.0 of jscript. If you check the msdn documentation, each jscript object and method lists the version of jscript in which it was implemented. Much of the fancier stuff, like html goodies, was added in jscript 5+. Few XSI scripts have call for most of the new methods, except for Array.push().

If your jscript is failing on linux due to the push method, you can extend the Array object yourself.I grabbed the following lines from the XSI wiki ( http://softimage.wiki.avid.com/index.php/Arrays_in_JScript_(XSISDK) ). Paste this code block at the top of your jscripts and they should run:

// (at)cc_on
// (at)if ((at)_jscript_version <= 5.5)
var push = function(){
	for( var i = 0; arguments[ i ] != null; i++ )
		this[this.length++] = arguments[ i ];
	return( this );
	}
Array.prototype.push = push;
// (at)end



  
 -------Original Message-------
 Ah. Push is the problem.
 
 Ok, is this something that's pending? Is that installed when you install
 xsi, or is it in the Linux build itself?
 
 Thanks Brad.
 
 brad wrote:
 
 Can you run jscript at all? Or is it a question of existing jscripts just
 failing to finish.  The version of jscript running on linux is older than
 the one running on windows, so it's missing a handful of commands and
 jscript object methods. The most frequent offender is the lack of a push
 operator on the linux jscript array.  -Brad
 
 -------Original Message-------  If jscripts don't work on my Linux
 install of XSI, that would be  abnormal right?    Does anyone have ideas
 why this could be?    --  David Gallagher  Animator, Blue Sky Studios
 ---  Unsubscribe? Mail [LINK: mailto:Majordomo(at)Softimage.COM]
 Majordomo(at)Softimage.COM with the following text in body:  unsubscribe xsi
 
 
 --- Unsubscribe? Mail [LINK: mailto:Majordomo(at)Softimage.COM]
 Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
 
 
 --  David Gallagher Animator, Blue Sky Studios
    
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


  


-- 
David Gallagher
Animator, Blue Sky Studios

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.