I use packer as well. The main problem is that packer put everything on
one line.
This causes problems because of missing semicolons (function endings I
think?).
For some reason, the regular packing tools for OpenLayers does not
combine the faulty lines.
The easiest way to find these problems is to take the OpenLayers.js file
and remove all linefeeds.
The problem is then tracking it back to the file that created the problem.
I would give you my patch, but it is for OL 2.5, so not much use.
When I upgrade to 2.7, I will try to make a single patch for the missing
semicolons, and submit it.
Regards, Kenneth Skovhede, GEOGRAF A/S
Christopher Schmidt skrev:
On Thu, Oct 02, 2008 at 05:55:37AM -0700, BrainDrain wrote:
I think that code strictness is not such a bad property.
Are you saying that the OL code fails JSLint? It doesn't seem to for me
at the moment. If that's the case, please offer at least data about how
to reproduce it or what error you're getting, and preferably with a
patch.
Paul Spencer-5 wrote:
I periodically run jslint on the openlayers code base and commit
changes to fix things like missing semi-colons. I haven't had any
problems using jsmin or the YUI compressor. I haven't tried Packer
for a while, I have a fundamental dislike of the approach he takes
(using eval() to load the code) but that is mostly a personal opinion.
Cheers
Paul
On 2-Oct-08, at 8:31 AM, BrainDrain wrote:
HI
Why well-known js packer (http://dean.edwards.name/packer/) breaks
OL code?
It becomes unworking.
I've tried online and c# versions of this packer (and some others from
codeproject). Results - the same.
It turned out, that not all of my code is compatible with this
packer and I
tried to test it with JSLint.
After some revision with the help of JSLint I achieved a success
(for my
code).
But what about OL? base62 encoding has good compression ratio -
almost 50%
Paul
--
View this message in context:
http://www.nabble.com/OL-code-JS-%28ECMA-%29-standarts-compliance-and-code-packing-tp19778306p19778306.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
--
View this message in context:
http://www.nabble.com/OL-code-JS-%28ECMA-%29-standarts-compliance-and-code-packing-tp19778306p19778713.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users