On 07.08.2009 20:17, Jim Hunter wrote:
I have read this over a couple of times and I don't see why the
following code won't work, eliminating the need for the eval in the
first place:
var columnTitle = "get from somewhere else";
var myLabel = new qx.ui.form.Label(this.tr <http://this.tr>(columnTitle))
if you make this statement, you couldn't run neither "source" nor
"build" - it's failing.
That's why I'm using currently eval-crap things.
You could see this in bug here
http://bugzilla.qooxdoo.org/show_bug.cgi?id=2639
But eval can be used for other things too.
even if the variable name gets shortened, both instances get
translated the same so it should work.
I have a rule of thumb that says if you are using the eval statement,
think hard about why you are using it. There is usually a way to
accomplish the same thing without using the eval.
Jim
On Fri, Aug 7, 2009 at 2:04 AM, A.Yerenkow <[email protected]
<mailto:[email protected]>> wrote:
Hello guys!
I have a little problem with eval(); and run-build;
because code like:
var columnTitle = "get from somewhere else";
var myLabel = new qx.ui.Label(eval("this.tr
<http://this.tr>(columnTitle);"));
changes to:
var y = "this.tr <http://this.tr>(columnTitle);"
var Dd = "get from somewhere else";
var De = new qx.ui.Label(eval(y));
And oops, nothing works :)
I solved this, like this:
var myLabel = new qx.ui.Label(eval("this.tr <http://this.tr>('" +
columnTitle + "');"));
which builds into something like this:
var y = "this.tr <http://this.tr>('" + Dd+ "');";
var De = new qx.ui.Label(eval(y));
So, working with simple strings can be easily done; But, looking into
future - I have a question.
Can I specify a variable names, which would not changed during build?
for example, variable name "globalApplication" - I don't want to be
changed to some random XX.
Is this possible? :)
And, with that I'm not want to get working translations, that's for
other purposes.
--
Best Regards
Alexander Yerenkow,
Generalissimo of UCT
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports
2008 30-Day
trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Best Regards
Alexander Yerenkow,
Generalissimo of UCT
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel