| Page 1 of 1 | [ 3 posts ] |
|
I’m trying to document functions that are defined in different files and that sit on the same level of the namespace as some classes. Something roughly like:
Code: [source1.js] global = { myapp: {} }; /** @class global.myapp.class1 */ global.myapp.class1 = { }; /** @class global.myapp @static */ /** @method func1 @static */ global.myapp.func1 = function() { }; [source2.js] /** @class global.myapp @static */ /** @method func2 @static */ global.myapp.func2 = function() { }; /** @method func3 @static */ global.myapp.func3 = function() { }; What I’d like is to see global.myapp in the class list and see func1, func2 and func3 listed as its methods. I can sort of achieve that by doing the above, but global.myapp appears twice in the class list (pointing to the same page) and yuidoc complains about the global.myapp class getting redefined. Is there no way to attach functions from different source files to the same container class? I tried specifying the full path in the @method definition outside of a class and that didn’t work either (the functions didn’t show up anywhere). Thanks, John |
|
You can use @for for this:
@for class.defined.elsewhere // all subsequent items are applied to class.defined.elsewhere until another @class or @for is discovered. -Adam |
|
Thanks. The documentation for @for seemed to imply it was only for creating inner classes. It does work, though the parser still complains that the class is being redefined even after I removed the extra definition.
|
| 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