PDA

View Full Version : What's happened to dynamic loading?



silcreval
30 Dec 2011, 9:49 AM
Just trying ext 4.1.0 beta 1 on a simple login app.

I use the ext 4.0 dynamic loading system for development, but get this when
I try to use ext-4.1. I assumed 'ext-all-dev' is the new 'ext-debug' :

Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.ux.mystuff.dialog.Login http://*****/ext/ext-debug.js Line 5659

mitchellsimoens
30 Dec 2011, 11:07 AM
Did you enable it?


Ext.Loader.setConfig({
enabled : true
});

dongryphon
30 Dec 2011, 11:07 AM
Just trying ext 4.1.0 beta 1 on a simple login app.

I use the ext 4.0 dynamic loading system for development, but get this when
I try to use ext-4.1. I assumed 'ext-all-dev' is the new 'ext-debug' :

Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.ux.mystuff.dialog.Login Line 5659

You should be able to configure the loader and enable it:



<script type="text/javascript" src="ext-all-dev.js"></script>
<script type="text/javascript">
Ext.Loader.setConfig({
enabled: true,
paths: {
My: 'my_own_path'
}
});
</script>


I'm not sure why this would be different between 4.0 and 4.1. I will have to ask Jacky.

dongryphon
30 Dec 2011, 11:09 AM
Did you enable it?

@Mitchell - you are too fast!

pscanlon1
30 Dec 2011, 2:52 PM
I used to be able to load extjs class files all seperately....Did this behavior change? In 4.0 It would load a lot of files, but debugging was wayyyyy easier. Any way that we can still do this? I was using ext-all-dev.js before

dongryphon
30 Dec 2011, 3:05 PM
I used to be able to load extjs class files all seperately....Did this behavior change? In 4.0 It would load a lot of files, but debugging was wayyyyy easier. Any way that we can still do this? I was using ext-all-dev.js before

ext.js has only the minimum amount of stuff to get started. You can then Ext.require('*') or only what you need and they will load as separate scripts.

ext-all-dev.js should contain all classes. But I would have thought ext-all-dev.js would be the same experience between 4.0 and 4.1 though.

skirtle
30 Dec 2011, 3:32 PM
I assumed 'ext-all-dev' is the new 'ext-debug'

No, they're not the same. It seems that ext-debug.js and ext-dev.js are both missing from 4.1.0-beta-1.

To decode a little:


all means the whole library in one file. If it doesn't have all in the name then it uses dynamic loading.
debug means the source is not minified.
dev means the source is not minified too but it also means that the console warnings have been left in.


As ext-debug.js is missing, try using ext.js instead.

scancubus
30 Dec 2011, 7:45 PM
No, they're not the same. It seems that ext-debug.js and ext-dev.js are both missing from 4.1.0-beta-1.

To decode a little:

all means the whole library in one file. If it doesn't have all in the name then it uses dynamic loading.
debug means the source is not minified.
dev means the source is not minified too but it also means that the console warnings have been left in.

As ext-debug.js is missing, try using ext.js instead.



+ 1,000,000

bmacdon1
3 Jan 2012, 11:24 AM
Any reason why they were removed / Are they going to be replaced?

Bryan

mitchellsimoens
3 Jan 2012, 11:26 AM
It seems just to be an oversight. GA release will be done properly

bmacdon1
3 Jan 2012, 12:20 PM
Mitchell,
Thanks for the response. I am working on a rather large project (heavy sencha mvc) and we are trying to measure the feasibility of using the 4.1 beta. There are a lot of fixes we need, but I guess we will have to wait for the GA.

--Bryan

silcreval
7 Jan 2012, 3:18 PM
I just renamed ext.js to ext-debug.js and it worked OK.

Once I get past the login, I get an error about a missing AbstractFit.js file. I did a search in src and couldnt find it.

skirtle
8 Jan 2012, 1:04 AM
I just did a text search for AbstractFit in the whole 4.1.0-beta-1 distribution. The only place I found it was in the docs (they come bundled with a copy of 4.0.7 so that's to be expected).

Could you do a search for the text AbstractFit in your code, see where it comes from?

silcreval
8 Jan 2012, 8:23 AM
It's used in the desktop example.

silcreval
8 Jan 2012, 9:22 AM
I can get a bit further by commenting out the reference to AbstractFit (its not really needed anyway).

Now after loading

src/draw/engine/ImageExporter.js

I get an error:

comp.getItemId is not a function

}); ext.js Line 1093