Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tetris and javascript



fwiw, here's my attempt. It's stable enough to be viewed once in qc, but not to use as a screensaver (which was the original aim).

So far, we found two bugs in JavaScript:

1) Javascript inputs may be incorrectly set to "undefined" on first run instead of 0 if the input is connected to a numerical value that is 0.
-> workaround: check for undefined inputs with:
if(inputs[0] == undefined)
...


2) JavaScripts may corrupt memory when writing more than once to the same output e.g.
outputs[2] = 2;
outputs[2] = 3;
-> workaround: use temporary variables:
var temp = 2;
temp = 3;
outputs[2] = temp;


________________________________________________________
Pierre-Olivier Latour                            email@hidden
Quartz Composer Architect                Graphics & Imaging Team

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Tetris and javascript (From: Will Thimbleby <email@hidden>)
 >Re: Tetris and javascript (From: Edward Brown <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.