[ 4 posts ]

dmauer

  • Joined: Thu Oct 08, 2009 6:09 am
  • Posts: 9
  • Offline
  • Profile

ScrollingDataTable class doesn't exist (but DataTable does)?

Post Posted: Thu Nov 05, 2009 8:21 am
+0-
I'm having a rather odd issue here.

I'm trying to set up a ScrollingDataTable. I've got my DataSource defined and populated, and then I try to instantiate a new ScrollingDataTable, but it appears the constructor function YAHOO.widget.ScrollingDataTable doesn't exist! Looking in the Firebug console, YAHOO.widget.DataTable evalutates to a function(), but YAHOO.widget.ScrollingDataTable is undefined. I'm using YUI version 2.8.0r4.

I'm importing the YUI libraries like this:
Code:
   <script type="text/javascript" src="/plugins/yui/build/yahoo/yahoo-min.js"> </script>
   <script type="text/javascript" src="/plugins/yui/build/event/event-min.js"> </script>
   <script type="text/javascript" src="/plugins/yui/build/connection/connection-min.js"> </script>
   <script type="text/javascript" src="/plugins/yui/build/dom/dom-min.js"> </script>
   <script type="text/javascript" src="/plugins/yui/build/json/json-min.js"></script>
   <script type="text/javascript" src="/plugins/yui/build/datasource/datasource.js"></script>
   <script type="text/javascript" src="/plugins/yui/build/datatable/datatable.js"></script>


Anyone have any ideas?

Thanks!
-Dan

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: ScrollingDataTable class doesn't exist (but DataTable does)?

Post Posted: Thu Nov 05, 2009 8:38 am
+0-
Both come defined in the very same file, you cannot load one and not the other.

Perhaps there is something that undefines it or got an old version of datatable.js mixed in your folders.

Anyway, you might want to run the dependency configurator, I feel you might as well load utilities.js and spare you some download time, or at least yahoo-dom-event.js

dmauer

  • Joined: Thu Oct 08, 2009 6:09 am
  • Posts: 9
  • Offline
  • Profile

Re: ScrollingDataTable class doesn't exist (but DataTable does)?

Post Posted: Thu Nov 05, 2009 8:48 am
+0-
Aha! I had to load utilities.js. Thanks!
-dan

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: ScrollingDataTable class doesn't exist (but DataTable does)?

Post Posted: Thu Nov 05, 2009 9:47 am
+0-
Now I notice!

You were missing element.js amongst the dependencies. You didn't need to load utilities.js you might still load them all individually, but you had to load element.

ScrollableDataTable didn't get defined because when loading datatable.js it produced an error because of the missing Element component and never got far enough to reach the SDT declaration.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum