Ahh yes! There seems to be some misunderstanding about what I've done.
There are two things here which interfere with the $ notation of
prototype (and maybe jQuery):
1. The string opimizer creates an array (hash?) which is named $[1],
$[2] etc.
2. The variable optimizer creates optimizations of the variable names.
Variable expressions like:
var foo = bar + shoo;
gets optimized into
var $1 = $2 + $3;
This also interferes with the prototype $
So using --package-id just has (as I have learned by example) an
influance on point 1, the string optimizer (and maybe others) but NOT
the variable optimizer.
Therefore I introduced another switch --optimize-variables-prefix which
is solution for point 2. If I specify here an underscore char the
expression gets optimized to:
var $_1 = $_2 + $_3;
and my problem with prototype is solved.
thron7 schrieb:
Gee, Dietrich, *you* were the one to last write about --package-id on
the ML (I forgot that):
http://www.nabble.com/Use-jQuery-and-qooxdoo-0.7.x-together-td22349217.html#a22352486
Why would you re-implement this?!
Thomas
Dietrich Streifert wrote:
Hello everybody!
This is for qooxdoo 0.7.x.
I'm in need of using a charting library (flotr) which is based on
prototype.
generator.py uses the $ sign as a prefix for optimized variables like
$1, $2 etc which clashes with the $ notation of prototype in the build
version.
I've found the location where the prefix "$" is set in generator.py
and managed to introduce a new option for the optimizer:
--optimize-variables-prefix
which then may be used to add a prefix befor 1, 2, 3 etc. in the
optimized variable name.
I'm using this as follows:
--optimize-variables-prefix=_
so now the generator creates variable names like $_1, $_2 etc. which
do not clash anymore with prototype.
A patch against rev. 18378 of branches/legacy_0_7_x/qooxdoo is attached.
------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel