Hi Sebastian,

thank you for your very fast reply, as always!

I just tried it again myself, this time on a windows system. I used
quickstart version 0.7-beta-1 and Firefox 2 for this test. The behavior
makes no sense to me and is either a feature I haven't read about or some
side effect:

As soon as I enter:

 qx.Class.define("java.foo.Bar", {});

the Java icon in the Windows systray appears, just like it would do if the
website contained a Java applet. When I type

 alert(java.foo.Bar)

the result is: [JavaPackage java.foo.Bar]. The leading "JavaPackage" is what
confuses me. Because when I do this for example with "javi.foo.Bar", it only
prints "[javi.foo.Bar]".

If I extend the example a little bit and say:

 qx.Class.define("java.foo.Bar", {extend: qx.core.Object});
 qx.Class.define("javi.foo.Bar", {extend: qx.core.Object});
 new java.foo.Bar();
 new javi.foo.Bar();

I get the error "java.foo.Bar is not a constructor". "javi.foo.Bar" on the
other hand instantiates without a problem.

Maybe this is the side effect of an qooxdoo feature that I haven't noticed,
but I couldn't find anything regarding JavaPackage in the documentation.


Thank you,
Sascha


On 5/30/07, Sebastian Werner <[EMAIL PROTECTED]> wrote:

Hi Sascha,

I've just tested this in the Firebug console:

   qx.Class.define("java.foo.Bar", {});
   alert(java.foo.Bar)

and it seems to work well for me.

Sebastian




Sascha Haeberling schrieb:
> Hello!
>
> I am currently working on the integration of qooxdoo into the XML11
> project, as I mentioned some time ago. A part of what we do is
> translating Java classes to javascript. But I am running into the
> problem, that whenever I have a package called "java", qooxdoo fails. Is
> this maybe a reserved word?
> I can reproduce this error very easily: If I say
> qx.Class.define("java.Test")... and try to create a new object with new
> java.Test() it tells me, that the constructor could not be found. If I
> change it to "javi.Test", for example, everything is fine. I am using
> version 0.7 beta-1.
>
> Is this a bug in qooxdoo, a browser reserved word or a limitation on
> purpose? Of course, having "java" as the package name should never
> happen in usual AJAX applications, but in our case it unfortunately
> happens. If there is no way, I have to implement some kind of
> name-changing, whenever the package name "java" is occuring. But it
> would be nice if this could be avoided.
>
> Thanks for you help!
> Sascha Häberling
>
>
> ------------------------------------------------------------------------
>
>
-------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to