xtk / X

The X Toolkit
http://www.goXTK.com
Other
795 stars 266 forks source link

use goog.isArray(color) instead of (color instanceof Array) #91

Closed srikanthpagadala closed 12 years ago

srikanthpagadala commented 12 years ago

XTK codebase checks for instanceof Arrays like this -> "color instanceof Array". More appropriate way would be -> "goog.isArray(color)".

This bug was found when using XTK with GWT.

More detailed discusion about this bug can be found on this stackoverflow thread

http://stackoverflow.com/questions/11076872/simple-color-assignment-not-working-in-xtk-with-gwt-mesh-color-0-7-0-0

Thank you.

haehn commented 12 years ago

Can you do these changes and provide a pull request? Would be highly appreciated. I read that you did the changes locally for you.

srikanthpagadala commented 12 years ago

Daniel, I have never done a pull request, but am willing to learn and try. give me few days to let you know if i can commit to doing it.

haehn commented 12 years ago

if you already compiled xtk, you can def. do it!!

haehn commented 12 years ago

dude, the pull request didn't work - I had to revert.. please try the compilation and the code before submitting again..

Stuff like this:

X/visualization/renderer2D.js:423: ERROR - Parse error. missing ) after condition

if (goog.isDefAndNotNull(file) && goog.isArray(file) { ^

haehn commented 12 years ago

/net/pretoria/local_mount/space/pretoria/2/chb/users/daniel.haehn/Projects/X2/visualization/renderer3D.js:576: ERROR - Parse error. missing ) after condition } else if (goog.isDefAndNotNull(file) && goog.isArray(file) {

srikanthpagadala commented 12 years ago

sorry! let me try again.

On Wed, Aug 29, 2012 at 9:01 AM, Daniel Haehn notifications@github.comwrote:

/net/pretoria/local_mount/space/pretoria/2/chb/users/daniel.haehn/Projects/X2/visualization/renderer3D.js:576: ERROR - Parse error. missing ) after condition } else if (goog.isDefAndNotNull(file) && goog.isArray(file) {

— Reply to this email directly or view it on GitHubhttps://github.com/xtk/X/issues/91#issuecomment-8130223.

haehn commented 12 years ago

All works fine now! Thank you!!!