PDA

View Full Version : [solved] ext-all.js is not the same in the documentation and in the source



olivierpons
15 Jan 2010, 2:35 PM
Hi !

Here's what I'm trying to do: create a personal tree almost like the one in the documentation.

If you download extjs-3.1.0 you'll see in the folders two versions of ext-all.js:

The first one is at the root and is 649 777 bytes.
The second one is in the ext-3.1.0\docs\resources folder and is 538 956 bytes.

If you modify the index.html documentation and change :


<script type="text/javascript" src="resources/ext-all.js"></script> to the "current release" :


<script type="text/javascript" src="../../ext-all.js"></script>the index.html documentation doesn't work anymore.
Firebug says "sp is not defined".

My question is: why? I tried for a long time to create my own class using something like:


ApiPanel = function() {
ApiPanel.superclass.constructor.call(this, {
id:'api-tree',
region:'west',
split:true,
collapseMode:'mini'
});
};
and it doesn't work... but i've included the root JavaScript

/ext-3.1.0/ext-all.js file...

maybe it has something to do with it?

What shall I do? Do you have an example of very simple class that uses the
/ext-3.1.0/ext-all.js file?

I'm stuck !

Animal
15 Jan 2010, 2:39 PM
What is the superclass? That's what it's complaining about.

olivierpons
16 Jan 2010, 12:49 AM
I may misunderstand, but I think this is not about a superclass problem (I've just copied/paste the sourcecode from the "extjs-3.1.0/documentation/index.html" because I need something like that).

The problem is that this works when I include
extjs-3.1.0/docs/ressource/ext-all.js and it does not work when I change it to the "official" js which is at the root i.e.
extjs-3.1.0/ext-all.js.

To be short:
extjs-3.1.0/docs/ressource/ext-all.js is not the same than
extjs-3.1.0/ext-all.js and does not work the same way.

From a ExtJs's beginner this is not a normal behaviour and I've seen that there's (to the least) a size difference between the two files whereas (still from my humble p.o.v.) they should be identical. The help files should use the same ExtsJS code than the one it is shipped with, or maybe I don't understand something...

If you could explain why those two ExtJs files are differents, that would help me. Actually I do think I have to rely on the root file
extjs-3.1.0/ext-all.js, but I'd like first to make the documentation work with it. And I can't: if I change in the
extjs-3.1.0/docs/index.html file those lines:

from:
<script type="text/javascript" src="resources/ext-all.js"></script>to:

<script type="text/javascript" src="../../ext-all.js"></script>the help file doesn't work anymore whereas it should be able to use the "official" 3.1.0 code (from my p.o.v.)!! What am I misunderstanding?

Animal
16 Jan 2010, 1:15 AM
"sp is not defined"

That's the superclass not being defined.

olivierpons
16 Jan 2010, 3:42 AM
I'm sorry I was wrong I typed "../../" instead of just "../"

if you include like this:

<script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-all.js"></script>

instead of


<script type="text/javascript" src="resources/ext-base.js"></script>
<script type="text/javascript" src="resources/ext-all.js"></script>

It works.
Beginner's mistake...

It's very sad that it seems there's no way to detect if a JavaScript file doesn't exists in Firebug... (am I wrong?)...

Animal
16 Jan 2010, 6:52 AM
look at the net tab for 404s

they are red

Jacky
16 Jan 2010, 7:03 AM
When you open the "ext-3.1.0\docs\resources\ext-all.js", you will find that it's version is "2.2".
That's why two files show diffrent size.