Redundant code in generated javascript files

1 view
Skip to first unread message

Oliver Friedrich

unread,
Apr 30, 2010, 6:15:28 AM4/30/10
to QxTransformer Mailing List
Hi Serge,

i had mentioned it before, that Qxt generates redundant code for
properties, that can be set by the constructor of an widget, etc ...

This behaviour of redundant code is not limited to labels. It seems to
be a general proplem in several elements like treeFile, treeFolder,
textField, etc ....

IMHO this is bad for performance of the resulting application as it
inserts an additional call to a method of the object, that could be
avoided. And in case of i18n it generates much more calls as in some
elements the constructor don't get a null value but the definied value
itself.

I don't know, if you have worked on it already, but now i find this in
the generated javascript files:

XML:
> <qx:label id="strUploadDimensions" value="120x120 mm" />

Javascript:
> var strUploadDimensions = new qx.ui.basic.Label(null);
> strUploadDimensions.setValue('120x120 mm');

This doesn't solve the problem of calling the method for seting the value.

The better solution would be:
> var strUploadDimensions = new qx.ui.basic.Label('120x120 mm');

Properties, that can be set via the constructor should be set via the
constructor and not through a available setter. It's not a hi prio
thing, but i think, it should be "fixed".

Cheers,
Oliver


--
Oliver Friedrich

Hammerschmidtstr. 39 | oli...@familie-friedrich.de
50999 Köln-Sürth | http://familie-friedrich.de
fon +49.(0)2236.5093052 | Skype: o.friedrich
fax +49.(0)2264.286479 | ICQ: 33857371

Secure Mail via PGP Signing & Encryption (Info: www.gnupg.org)
PGP ID: 0x5FBEE7EC

--
You received this message because you are subscribed to the Google Groups "QxTransformer" group.
To post to this group, send email to qxtran...@googlegroups.com.
To unsubscribe from this group, send email to qxtransforme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/qxtransformer?hl=en.

Siarhei Barysiuk

unread,
Apr 30, 2010, 8:59:07 AM4/30/10
to qxtran...@googlegroups.com
Hi Oliver,

That's the same problem you reported before. Label's 'value' property
was changed in 1.0 (the old name is content) that's because you have
null in constructor , I'll update config files.
You're absolutely right, it should be fixed and I'm going to take care
of this.

Serge
Reply all
Reply to author
Forward
0 new messages