| Page 1 of 1 | [ 3 posts ] |
|
I've introduced a patch for DataTableScroll, but in trying to integrate it and get it ready for a gallery-based I can't get it working.
I've setup a fiddle here: http://jsfiddle.net/jshirley/SRRaa/2/ The arg.toString() coming from the anon function in Y.cache is confusing me. I'm not sure why that would be undef, or where exactly I've gone off the rails. The patched file is at http://j.shirley.im/static/yui3/build/d ... l-debug.js This error is fired when the .render() method is called. If there is a dt.after('render', function() { ... }) listener attached, it is never fired (which is what is blocking me for the time being). |
|
I can't imagine why are you using Y.cached, it serves no purpose on functions that don't accept arguments. If a function takes no arguments or if the function being cached my change the value returned based on other factors but the arguments themselves, Y.cached serves no purpose.
In this case, you are just as well calculating the value and storing it. Your cached function gets executed just once, when the module is initially loaded so it won't be recalculated. Y.cached might be confused by the lack of arguments to use as a key to fetch the calculated value. Anyway, since you don't really need Y.cached, it doesn't matter why it fails. |
|
It does matter why it fails, because it blocks any events on render.
I guess my patch will also include completely removing the call to Y.cached. To be clear, the DataTableScroll plugin is what is in 3.4.0, I've just fixed some of the width calculation methods (as you can see, it's not working in the fiddle because of the error) |
| Page 1 of 1 | [ 3 posts ] |
| 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 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group