views:

24

answers:

2

Does anyone know if there are any known issues subscribing to events fired by a YUI2 DataTable when using with YUI3 2in3? I'm trying to do the following and it's not working:

myDataTable.subscribe("initEvent", function(){
   Y.log('******** hello from initEvent');
});   

Other features of the DataTable seem to be working but I can't seem to tap into any events.

Does anyone else have issues with this? Any suggestions?

Thanks,
Bart

A: 

Bart,

http://ericmiraglia.com/yui/demos/2in3dt.php

Subscribing to the init event and the row click event seems to work using your syntax above. Is there something different about your implementation? Or perhaps the init event has already fired at the point where you're listening for it?

-Eric

Eric Miraglia
Bart Gottschalk
Bart,No, that doesn't make sense to me. "on" is just an alias to "subscribe", so you're not switching to a YUI 3 event in that case. And in the example I' linked to above, http://ericmiraglia.com/yui/demos/2in3dt.php, I'm using subscribe, and it works fine there. -Eric
Eric Miraglia
A: 

Sanity check: is the YUI2 event module loaded? Also, try loading the YUI2 logger, and make sure you are referencing the debug version of the scripts. The output is verbose, but usually shows where the problem is.

Gabe Moothart
Gabe,Using YUI 2 in 3, Bart shouldn't have to worry about whether YUI 2 Event or other DT dependencies are loaded -- that should be happening for him automatically. Cf:http://www.yuiblog.com/blog/2010/03/11/yui-2-in-3-coming-soon/-Eric
Eric Miraglia