2 May 2007 3:06 AM #1
Visual Studio Web Developer 2005 Express
Trying to get ext up and running, stand alone no problem but when having a folder ext with all ext in it and another folder elsewhere with a simple html page that includes the scripts from the ext folder and a script with an Ext.onLoad, Ext is not defined. What am I doing wrong? Can anyone tell me what is required to combine VSWD 2005 Express with Ext? Ext looks very promising to me. Maybe there is another development environment better suited?
2 May 2007 3:54 AM #2
Can you post your Ext include links?
2 May 2007 4:11 AM #3
Gladly, I have zipped up the folder with a copy of the ExtStart example. This example is located next to the folder in which I extracted Ext like so:
Double-clicking the html file shows the alert() from the ExtStart.js, opening exttest1 using VSWD shows the page but no alert because Ext is undefined. Apparently Ext is not instantiated for some reason that I am unaware of.
I hope this is helpful information,
2 May 2007 4:27 AM #4
I guess that server cannot find the directory. You include like this:
Is your directory structure as follows?
My solution now ist to start include links with / so I always start from document root. A little bit more typing but I can move files within project tree without fixing anything.
2 May 2007 5:02 AM #5
2 May 2007 6:44 AM #6
The only problem with "http://localhost/ext" links is that if you move your app to another server you have to edit 'em.
You can try to make links document root relative starting with slash. Let's say you have document root at /www/myapp and your ext is in /www/myapp/extjs/ext-1.0.1.
Your links would then be: "/extjs/ext-1.0.1/ext-all.js", etc.
If you move your app (with same directory structure) to another server under another document root you do not need to change a line and everything will work.
2 May 2007 9:56 AM #7
I tried that to no avail, really. My guess is it is something specific to VSWD, some setting or limitation, not sure though, so if anyone is using VSWD and using root path I'd be interested to know.
2 May 2007 10:48 AM #8
I'm the linux guy and I don't know at all what's VSWD . My "development environment" is vim and firefox/firebug.
Maybe it's a bit more to learn but I'm sure that what-I-type-is-what-I-get.
2 May 2007 2:21 PM #9
If you're running under Visual Studio, you will likely have a created a web project called ext, which creates an IIS virtual dir of that name. In order to run the examples from VS in this case, you'll have to change the paths to the includes (js and css) to be based of the virtual, not a relative path. I'm sure there's probably a section in the VS doc on how to do this - it's the basis of all web dev in VS.d