1. #11
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    The simple approach:

    Code:
    <script src="/extjs/adapter/yui/yui-utilities.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/adapter/yui/ext-yui-adapter.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/ext-all.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/package/util.js" language="javascript" type="text/javascript"></script>
    <script src="/your/path/to/Slider.js" language="javascript" type="text/javascript"></script>
    Also make sure that if Slider has any other YUI dependencies aside from what's in yui-utilities, you must also include them before Slider. If you want, you can combine files, but it's not required just to get things working.

  2. #12
    Ext User
    Join Date
    May 2007
    Posts
    10
    Vote Rating
    0
    hypeway is on a distinguished road

      0  

    Default


    After adding other YUI dependencies to the includes, when I call the function, a new error caught by Firebug referencing to ext-yui-adapter.js:

    Code:
    _5c.animateX is not a function
    if(typeof YAHOO=="undefined"){throw "Unable to load Ext, core YUI utilities (yah...

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

      0  

    Default


    What do you includes look like now? You don't need Event, Dom, Animation, Connect, DragDrop. They're in the adapter and including them separately may cause problems.

  4. #14
    Ext User
    Join Date
    May 2007
    Posts
    10
    Vote Rating
    0
    hypeway is on a distinguished road

      0  

    Default


    Hi tryanDLS,

    I did not include those 5 js file references (Event, Dom, Animation, Connect, DragDrop), since they are already included in the adapter.

    My current includes look like this:

    Code:
    <script src="/extjs/adapter/yui/yui-utilities.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/adapter/yui/ext-yui-adapter.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/ext-all.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/package/util.js" language="javascript" type="text/javascript"></script>
    <script src="/extjs/source/yui/utilities.js" language="javascript" type="text/javascript"></script>
    /*** start: color picker helper functions ***/
    <script src="/js/color.js" language="javascript" type="text/javascript"></script>
    /*** end: color picker helper functions ***/
    <script src="/extjs/source/yui/slider.js" language="javascript" type="text/javascript"></script>

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

      0  

    Default


    Remove yui/utilities - that's a combined version of Event, DnD, Connection, etc. Also, I'm not sure why you're including package/util.js since you have ext-all.js

  6. #16
    Ext User
    Join Date
    May 2007
    Posts
    10
    Vote Rating
    0
    hypeway is on a distinguished road

      0  

    Default


    When the /yui/utilities.js was not included, Firebug reported an error stating that the slider is not a constructor. This error went away after I included the /yui/utilities.js file.

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

      0  

    Default


    Oh...Ext has eliminated the need for YUI Drag and Drop, so you need that file. My includes look like this now. It doesn't do anything, but it's not a JS error - I may not have the correct HTML - I just copied one of theirs.
    Code:
        <script type="text/javascript" src="/ext/adapter/yui/yui-utilities.js"></script>
        <script type="text/javascript" src="/ext/adapter/yui/ext-yui-adapter.js"></script>
    	<script type="text/javascript" src="/ext/ext-all.js"></script>
        <script type="text/javascript" src="/yui/build/dragdrop/dragdrop.js"></script>
    	<script type="text/javascript" src="/yui/build/slider/slider.js"></script>
        <script type="text/javascript" src="/yui/examples/slider/js/color.js"></script>

  8. #18
    Ext User
    Join Date
    May 2007
    Posts
    10
    Vote Rating
    0
    hypeway is on a distinguished road

      0  

    Default


    Wow, that was it! It's working! Thank you very much, Tim!

    Another question, when I load an external file via setUrl (or setDefaultUrl), can Ext.get(id) access elements within that file?

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

      0  

    Default


    Yes - the update just puts the content into innerHTML of the element, so it just becomes part of the dom tree - you access in the standard way.

  10. #20
    Ext User
    Join Date
    May 2007
    Posts
    10
    Vote Rating
    0
    hypeway is on a distinguished road

      0  

    Default


    Sweeeeeet. Thanks again, guys.

Thread Participants: 2