Hey Thanks Alex, the if(!_testMode) did stop quartz composer from crashing, but Troy is right, the values are immutable.
That's cool though, i'll just have to make a new structure, its just a bit annoying. Thanks for all the help everyone Lango On Wed, Jan 6, 2010 at 2:48 AM, Troy Koelling <[email protected]> wrote: > Input values are immutable. You need to create a new array if you want to > change values. > > On Jan 5, 2010, at 1:37 AM, Alex Drinkwater wrote: > > > function (__structure outputArray) main (__structure inputArray) > > { > > if(!_testMode) { > > var result = new Object(); > > result.outputArray = inputArray; > > > > return result; > > } > > } > > > > Should work. I can't test it right now, but give it a go. > > > > > > a|x > > http://machinesdontcare.wordpress.com > > > > > > > > On 5 Jan 2010, at 09:14, David Langford wrote: > > > >> Hey everyone. > >> > >> Simple question here. > >> > >> I want to do something like this in the javascript patch > >> > >> function (__structure outputArray) main (__structure inputArray) > >> { > >> var result = new Object(); > >> result.outputArray = inputArray; > >> > >> // Loop through outputArray and modify some numbers > >> > >> return result; > >> } > >> > >> This and others similar seems to always crash Quartz Composer. So i > think this is telling me it doesn't like it. > >> > >> Just wondering if there is a way to use the modify the input structure > and output it before I go and have to make a new array and copy everything > into it. > >> > >> Cheers > >> > >> Lango > >> _______________________________________________ > >> Do not post admin requests to the list. They will be ignored. > >> Quartzcomposer-dev mailing list ( > [email protected]) > >> Help/Unsubscribe/Update your Subscription: > >> > http://lists.apple.com/mailman/options/quartzcomposer-dev/the_voder%40yahoo.co.uk > >> > >> This email sent to [email protected] > > > > _______________________________________________ > > Do not post admin requests to the list. They will be ignored. > > Quartzcomposer-dev mailing list ([email protected] > ) > > Help/Unsubscribe/Update your Subscription: > > > http://lists.apple.com/mailman/options/quartzcomposer-dev/tkoelling%40apple.com > > > > This email sent to [email protected] > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Quartzcomposer-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > > http://lists.apple.com/mailman/options/quartzcomposer-dev/langford.d%40gmail.com > > This email sent to [email protected] >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

