It appears that "String" is somewhat of a reserved name in pyjamas. I
had a class called String (which is fine in Python) but in the
compiled code it inadvertently uses the built in javascript String
object instead of my String class.

$cls_definition['firstname'] = (typeof String ==
"undefined"?$m.String:String)();

Python code looks something like this:

class String: pass

class Foo:
  firstname = String()


As you can see in the compiled line earlier, there is a check if
String exists in the javascript namespace before it checks the $m
namespace. So, my String classes never gets used.

 - lex

Reply via email to