| Page 1 of 1 | [ 2 posts ] |
|
Hi,
I encountered some problem using oop module's augment() function. Here is the code: Code: <script type="text/javascript" src="http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js"></script> <script type="text/javascript"> YUI().use('oop', function(Y){ function Robot(){ } Y.augment(Robot, Y.EventTarget); }); </script> Running this will prompt an error saying "k is undefined". However, if I used node module instead to implicitly include the oop module, it worked. Code: YUI().use('node', function(Y){ function Robot(){ } Y.augment(Robot, Y.EventTarget); }); Is there anything to notice while using oop module directly? Thanks! |
|
Hello,
the 'oop' module only requires yui-base and oop, but to use Y.EventTarget you need event-custom-base which is loaded in with node. You can see which module the supplied methods are in in the API http://yuilibrary.com/yui/docs/api/ and you can also see which modules are required by using the configurator http://yuilibrary.com/yui/configurator/. |
| Page 1 of 1 | [ 2 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