1. #1
    Ext User
    Join Date
    May 2007
    Posts
    7
    Vote Rating
    0
    lemz is on a distinguished road

      0  

    Default [SOLVED] Error in Ext.js caused by Tree.js

    [SOLVED] Error in Ext.js caused by Tree.js


    Loading the following:

    Code:
    <script src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/dom/dom-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/connection/connection-min.js"></script> 
    <script src="http://yui.yahooapis.com/2.2.2/build/animation/animation-min.js"></script>
    
    <script type="text/javascript" src="/javascripts/ext/ext-yui-adapter.js"></script>
    <script type="text/javascript" src="/javascripts/ext/ext-core.js"></script>
    <script type="text/javascript" src="/javascripts/ext/util.js"></script>
    <script type="text/javascript" src="/javascripts/ext/dragdrop.js"></script>
    <script type="text/javascript" src="/javascripts/ext/splitbar.js"></script>
    <script type="text/javascript" src="/javascripts/ext/layout.js"></script>
    <script type="text/javascript" src="/javascripts/ext/tree.js"></script> <!-- causes a JS error somewhere -->
    <script type="text/javascript" src="/javascripts/ext/tabs.js"></script>
    <script type="text/javascript" src="/javascripts/ext/state.js"></script>

    Error

    Code:
    Error: sp has no properties
    Source File: http://localhost:3003/javascripts/ext/ext-yui-adapter.js
    Line: 9
    Removing tree.js makes the error go away.

  2. #2
    Ext User
    Join Date
    May 2007
    Posts
    7
    Vote Rating
    0
    lemz is on a distinguished road

      0  

    Default


    I realized that it wasn't very useful because it's all compressed, so I replaced ext-yui-adapter.js with Ext.js and yui-bridge.js. This is where the error is:

    Code:
    Error: sp has no properties
    Source File: http://localhost:3003/javascripts/ext/Ext.js
    Line: 184
    It doesn't seem to break any functionality... at least none that I'm using.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Why are you including the base yahoo files? The only one you might need is treeview - if you're using their tree instead of the Ext one. Also, you shouldn't include the individual Ext files unless there is a reason to. It can sometimes lead to strange problems when an object gets redefined.

  4. #4
    Ext User
    Join Date
    May 2007
    Posts
    7
    Vote Rating
    0
    lemz is on a distinguished road

      0  

    Default


    Quote Originally Posted by tryanDLS View Post
    Why are you including the base yahoo files? The only one you might need is treeview - if you're using their tree instead of the Ext one. Also, you shouldn't include the individual Ext files unless there is a reason to. It can sometimes lead to strange problems when an object gets redefined.
    I'm pulling in only the files that I need to minimize the size. My guess is, I'm missing an include that's causing this problem, even though everything I need works flawlesly.

    Yahoo includes are the minimum I need in order to make required Ext classes to work.

  5. #5
    Ext User
    Join Date
    May 2007
    Posts
    7
    Vote Rating
    0
    lemz is on a distinguished road

      0  

    Default


    Including "forms.js" wasn't working at all, so I had to finally go and look for it. Half hour later I traced the problem to missing include being "Component.js". Final working list looks like this:

    Code:
    <script src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/dom/dom-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script>
    <script src="http://yui.yahooapis.com/2.2.2/build/connection/connection-min.js"></script> 
    <script src="http://yui.yahooapis.com/2.2.2/build/animation/animation-min.js"></script>
    
    <script type="text/javascript" src="/javascripts/ext/ext-yui-adapter.js"></script>
    <script type="text/javascript" src="/javascripts/ext/ext-core.js"></script>
    <script type="text/javascript" src="/javascripts/ext/util.js"></script>
    <script type="text/javascript" src="/javascripts/ext/component.js"></script>
    <script type="text/javascript" src="/javascripts/ext/form.js"></script>
    <script type="text/javascript" src="/javascripts/ext/dragdrop.js"></script>
    <script type="text/javascript" src="/javascripts/ext/splitbar.js"></script>
    <script type="text/javascript" src="/javascripts/ext/layout.js"></script>
    <script type="text/javascript" src="/javascripts/ext/field.js"></script>
    <script type="text/javascript" src="/javascripts/ext/tree.js"></script>
    <script type="text/javascript" src="/javascripts/ext/tabs.js"></script>
    <script type="text/javascript" src="/javascripts/ext/state.js"></script>
    The order of YUI and first 4 Ext includes is significant.

  6. #6
    Ext User schmidetzki's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    110
    Vote Rating
    0
    schmidetzki is on a distinguished road

      0  

    Default


    Quote Originally Posted by lemz View Post
    I'm pulling in only the files that I need to minimize the size.
    Hm. But you force the browser to send a lot of single http-requests to get each single js-file. This wastes resources on the client AND the server.
    And it slows down load time at the client bc. the browser can handle only a few (something like 4) request in parrallel.
    It's better to have one single JS-file i. m. o.

  7. #7
    Ext User violinista's Avatar
    Join Date
    Apr 2007
    Location
    Serbia
    Posts
    293
    Vote Rating
    0
    violinista is on a distinguished road

      0  

    Default


    Just small tip: why don't you download and merge all YUI libraries in one file, and do the same thing with Ext? It will improve performance significantly.

    Anyway, it is good practice to reduce overall size of library, and use only what's needed.

    regards!

  8. #8
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    I would suggest that you include ext-yui-adapter and yui-utilites.js rather than individual files from Yahoo. The Ext files include all the base functionality and may have been potentially tweaked to deal with some problems. If you're going to try and reduce the download size by not including ext-all.js, use the 'Build your own' page to build a single file, instead of trying to include multiple small files, and fight possible dependency issues.

  9. #9
    Ext User
    Join Date
    May 2007
    Posts
    7
    Vote Rating
    0
    lemz is on a distinguished road

      0  

    Default


    Quote Originally Posted by violinista View Post
    Just small tip: why don't you download and merge all YUI libraries in one file, and do the same thing with Ext? It will improve performance significantly.

    Anyway, it is good practice to reduce overall size of library, and use only what's needed.

    regards!
    This is exatly what I did yesterday. I created copied the JS Build project and unchecked everything that I don't use.

  10. #10
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Using JSBuilder that way implies that you know all the dependencies and don't leave something out. Using the 'BYO' will handle the dependencies for you and let you just pick the components you want. Unless you're building off SVN, there's really no reason to use JSBuilder.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar