We recently ran into a problem with the instanceof operator when used in 
conjunction with the FCK editor. We were extracting information from a custom 
plugin in the form of an array, and then wanted to convert the array to a JSON 
format string.

However, json.stringify was failing.

The problem was that the FCK editor uses a different namespace. When the array 
is created, it's an instance of the Array class in the FCK namespace. However, 
when the data gets into qooxdoo any instanceof check fails (that's how 
stringify works) because the Array class in the qooxdoo namespace is different.

Chickenfoot came across this problem: 
http://groups.csail.mit.edu/uid/wiki/index.php?title=Chickenfoot_Coding_Conventions

They wrote their own instanceof function (see file 
ChickenFoot/xpcom/instanceof.js in 
http://groups.csail.mit.edu/uid/chickenfoot/developer-info.html ).

Maybe qooxdoo could do the same thing to improve support when code is running 
in different frames.

Hugh

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to