This is (almost) the right way to do this, but the doc tools don't
support it.
The doc tools don't parse code in <script> blocks, so if you do this,
you won't get any autodocs at all.
And, the reason it's almost the right way to do it is that in this
case (where all the code in a file is JavaScript), I'd use a *.js
file and <include> that, instead of an *.lzx file with a <script>
block. But the doc tools won't parse that either.
The doc tools actually can handle js files, and that's how they
autodoc the runtime library. There's just not a path for invoking
that code against files outside the runtime library.
I suggest using a *.js file anyway, and maintaining the sources to
the reference page by hand.
On Dec 2, 2005, at 8:32 AM, John Sundman wrote:
D'oh!
Actually, although that's an obvious point, it never occured to me.
I'll make sure it's made more clear in the documentation. Actually
the Developer's Guide doesn't even have a full chapter on scripting
(it merely has a short tutorial). I guess it's about time I wrote
one.
jrs
PS: I like your idea about alllowing the .js suffix.
On Dec 1, 2005, at 4:51 PM, P T Withington wrote:
If it is meant to only be used in script, then it should be
defined in script. Then you won't get the magic parallel tag
interface.
<script>
function LzTextFormat () {
...
}
</script>
Perhaps we should also allow files consisting solely of script to
have a .js suffix, but I don't think that is required to solve
this issue.
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev