Closed GoogleCodeExporter closed 8 years ago
I'm sorry, this issue has been posted twice accidentally.
Original comment by marijn.huizendveld@gmail.com
on 19 Apr 2008 at 3:28
Only the second issue had the attached file. Just to make sure that you have an
example I'll add it again here.
Sorry for all the extra messages.
Original comment by marijn.huizendveld@gmail.com
on 19 Apr 2008 at 5:05
Attachments:
Before I accept this I'd like you to correct a few errors first, in case those
are
causing the issue.
1) @scope tag (a synonym for @lends) must immediately precede an object literal
in
your code.
see http://www.jsdoctoolkit.org/wiki/index.php?page=lends
2) @class and @namespace cannot be combined.
see http://www.jsdoctoolkit.org/wiki/index.php?page=namespace
3) This metatag syntax isn't correct:
/**
* #@-
see http://www.jsdoctoolkit.org/wiki/index.php?page=Meta%20Tags
If you can send me a corrected version I'll have a look again.
Original comment by micmath
on 19 Apr 2008 at 5:13
Hi micmath,
It took me a little while but I can now provide you with an example that
demonstrates the bug more clearly.
See the attached file for the source and generate the documentation with the
following directive:
$ java -jar jsrun.jar app/run.js -a -p -t=templates/jsdoc API.js
You will get 4 warnings about the methods API.Callback.unRegister,
API.Callback.register, API.Callback._assertMethod and
API.Callback._assertCallbackID that cannot be documented as members of
API.Callback (the warning message shows them without
API.Callback)
API.Callback.invoke is documented as expected and so is API.CONFIG,
API.CONFIG.SET and API.CONFIG.GET.
If you change the name of API.Callback to API.CONFIG2 3 methods are documented:
API.CONFIG2.register, API.CONFIG2.unRegister
and API.CONFIG2._assertMethod.
Something other that I noted:scroll to the bottom of the file and remove the
multiline comment around the 6 if statements that define
console.
Regenerate the documentation and now 7 errors appear, this only happens when
the -a switch is used in the cli.
I am sorry for posting code hear before that didn't use the directives correct
but the readme file on your google group was so
explicit that I felt I needed to post it here. Should I ask first in the google
groups next time?
Thanks,
Marijn
Original comment by marijn.huizendveld@gmail.com
on 19 Apr 2008 at 8:49
Damn, I keep forgetting to attach those files :-D
Sorry
Original comment by marijn.huizendveld@gmail.com
on 19 Apr 2008 at 8:50
Attachments:
This is the correct place to post, but the new file still has many errors of
the same
type as I pointed out in my last message. In hopes of speeding this along I'll
try to
fix them myself but it's a big file and I'm not sure what you are wishing to
accomplish with your docs so, of the two of us, I'm not the best one to do that
work.
Original comment by micmath
on 19 Apr 2008 at 9:24
I've been playing around with your doclets a while and I think the problem (for
JsDoc
Toolkit) is the fact that you are declaring the problem symbols as inner
members of
an anonymous function, for example:
new function() { // anonymous function
function foo() { // inner function
}
}
This makes it very difficult for the JsDoc parser to use the code to determine
the
full name and membership of the symbol "foo". And even if you say it's a
"@memberOf
bar", it looks like you're saying that the anonymous function, of which foo is a
private, inner method is a member of bar. You need a way of saying, "just the
foo is
a memberOf ..." and that sort of statement isn't supported by JsDoc Toolkit
(yet).
However an easier way exists. If, instead of forcing the poor parser to try to
figure
the name out, you use @name tags in each of your doclets, things become much
more
obvious to everyone. For example:
/**
* @name bar
* @namespace
*/
new function() {
/**
* @name bar-foo
* @function
*/
function foo() {
}
}
This is more explicit and so more verbose, but it is guaranteed to get the name
right, and should only be required in this particular case of inner members of
anonymous functions.
If you believe this answers your report properly, I'll leave issue 128 open as a
request to add implicit support for the pattern you are using.
Original comment by micmath
on 19 Apr 2008 at 11:28
There has been no feedback on this issue so I am closing.
Original comment by micmath
on 27 May 2008 at 6:36
Original issue reported on code.google.com by
marijn.huizendveld@gmail.com
on 19 Apr 2008 at 3:26