View Full Version : Compressing Ext, or: sp has no properties
I need to optimize the pageloading of a page using Ext's grid component. ext-all.js is too big with its 466kb (+adapter&lib). All my attempts to use Ext's custom builds failed, each time I get this error:
sp has no properties
apply(function(), undefined, Object) ext-jquery-adapte... (line 9)
Ext={};window["undefined"]=window["undefined"];Ext.apply=function(o,c,_3){if(_3)...
I have no idea what "sp" may refer to. It seems like something is missing in the build.
The build process says that all dependencies are automatically resolved (with one exception). That may be true, but it seems like the dependency informations are incomplete. Eg. including grid d&d columns should require adding D&D core. This is a more obvious example, for most others I have no idea what is actually required.
Simply including everything isn't such a great option.
Quick facts
Using: Grid with JSON and HttpProxy, Ext 1.0.1a with jQuery adapter
Error: sp has no properties
brian.moeskau
5 Jun 2007, 9:11 AM
Unfortunately since the custom build only produces minimized code, it's impossible to tell what's missing. No idea what sp actually corresponds to. We can look at maybe providing the option of an uncompressed custom build in the future, but for now, there's not an easy way of determining what might be missing. I would temporarily remove the custom file include from your page and add in direct includes for each source file that you are using. That way, it should be pretty easy to determine what's missing. I realize that this is a bit of a pain, but at the moment I can't think of an easier way.
Thanks Brian. An uncompressed custom build could help a lot.
Meanwhile, I took ext-all.js and removed as much as possible. That way I figured out that there is hardly anything the Grid does not rely on. Eg. while I could delete most of the tree stuff, Ext.tree.TreeNode and Ext.tree.AsyncTreeNode are required. At least the form stuff isn't required.
thebashi
13 Jun 2007, 7:37 AM
i have same problem.
i think it isn't a dependency problem. cause i tried "check all" option, but still same.
You should be tested this tool for "check all" option i guess. at least i hope.
at first look, produced ext.js is slightly bigger(465KB ) then default ext-all.js(455KB ). it gives same error with my code and even with examples provided with distribution. (ext-1.0.1)
any suggestion ?
Ram Manoj
14 Jun 2007, 11:42 PM
I have developed a wonderful module using few components of Ext in an enhancement of our project.
But as time tells it.
In real-time the project being Live. The module cannot be used due to unacceptable page loading time.
I had been struggling to replace ext-all.js with "Build your own Ext" option.
I see these in Fire-bug:
sp has no properties
Ext.BasicForm is not a constructor.
I agree with 'thebashi'
i think it isn't a dependency problem. cause i tried "check all" option, but still same.
Hope the developer community of Ext notice this problem. And Guide accordingly.
pcorcoran
19 Jul 2007, 4:14 PM
I was having this problem also. I noticed that none of the files in /package include the Ext.MenuButton class, but /package/toolbar/toolbar.js is assuming it to be there.
So if you include toolbar.js but aren't manually including Ext.MenuButton from the /source tree, I don't see any way around getting this error.
gcsolaroli
24 Jul 2007, 5:46 AM
I am trying to move my project from Yui-ext .33 to Ext 1.1-rc1.
My project uses a custom build script, and I have to list all the dependencies.
Adding only the core files I get the original error:
sp has no properties reported on core/Ext.js, line 200.
I think I need to include the Ext native "adapter" (I have removed all YAHOO references from the project, and also the core YUI files).
Inspecting the source/ext.jsb I could not understand what file to include in order to fix this problem.
At the moment I am loading these Ext files:
core/Ext.js
core/DomHelper.js
core/Template.js
core/DomQuery.js
util/Observable.js
core/EventManager.js
core/Element.js
core/Fx.js
core/CompositeElement.js
data/Connection.js
core/UpdateManager.js
util/DelayedTask.js
I may need to add other files, but I was hoping to add them one-by-one, in order to include only the strictly needed files.
Any idea of what I could be missing?
Giulio Cesare
gcsolaroli
25 Jul 2007, 3:49 AM
I am trying to move my project from Yui-ext .33 to Ext 1.1-rc1.
My project uses a custom build script, and I have to list all the dependencies.
Adding only the core files I get the original error:
sp has no properties reported on core/Ext.js, line 200.
I think I need to include the Ext native "adapter" (I have removed all YAHOO references from the project, and also the core YUI files).
Inspecting the source/ext.jsb I could not understand what file to include in order to fix this problem.
At the moment I am loading these Ext files:
core/Ext.js
core/DomHelper.js
core/Template.js
core/DomQuery.js
util/Observable.js
core/EventManager.js
core/Element.js
core/Fx.js
core/CompositeElement.js
data/Connection.js
core/UpdateManager.js
util/DelayedTask.js
I may need to add other files, but I was hoping to add them one-by-one, in order to include only the strictly needed files.
Any idea of what I could be missing?
Giulio Cesare
As someone have already noticed, the above error was due to some broken dependency that I was able to fix including the relevant files into the build script configuration.
Giulio Cesare
christ1an
3 Aug 2007, 6:51 AM
[QUOTE=J
battisti
29 Jan 2008, 10:00 AM
i solve the problem insert the file
ext-2.0/adapter/ext/ext-base.js
askohen
1 Jul 2008, 12:39 PM
I am having this problem with a custom build of 2.1. If I try to include the Ext-base adapter beforehand, it doesn't help.
I created a build with these classes using the build your own page:
Core: include Layers and Containers
Core - Utilities
Core - State Management
Layout: include All Layouts, Window, Viewport
Resizable
QuickTips: +Ajax
Button Widget: include Button QuickTips and Actions
SplitButton Widget
SplitBar Widget
Menu Widget: +Actions (exclude color, datepicker)
Toolbar: +Menu Buttons, +Paging Toolbar, +Actions
Progress Bar
MessageBox
StatusBar
Form - Ajax and Loading Support: +XML Loading Support
Tabs
I get this error:
sp has no properties
Please see attached file for error. It is linking to the custom built file on our production server.
We really need to do custom builds for our work here. I hope you guys can address this. If the custom builder doesn't work right, then it should be taken down.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.