|
From: David H. <wa...@us...> - 2004-11-17 10:40:37
|
On Tue, Nov 16, 2004 at 05:04:46PM -0800, Luke Bayes wrote:
> On Tue, 16 Nov 2004 16:16:16 +0000, David Holroyd wrote:
> > I was knocking up a script to generate javadoc-like documentation over
> > the weekend, and I noticed that unlike other examples of AS2 classes that
> > I have to hand, the asunit.framework classes don't include the package-name
> > within the class-name. [...]
>
> First and foremost, I have an *extremely* difficult time reading any
> "recomendations" from Macromedia about "best Practices" related to
> coding Flash Applications.
[...]
Yep, ActionScript is on crack. This is a given :)
It doesn't really matter. I can arrange for type resolution to work by
ignoring any package-prefix contained in the file, and using the files
$CLASSPATH-relative package-path.
> To your question - My feeling (and Ali's too) is that we would like to
> have a "package" keyword as seen in Java (and I think C#). As a
> convention, our first import statement is actually the package that
> our class is found in. I assume that the compiler checks all wildcard
> imports to look for a file and uses the one that matches. Ultimately,
> we don't use the full-qualified class name because:
Well, ActionScript 2.0 is based on the proposed ECMAScript4 (for
small enough values of 'based'). In this instance, I think ECMAScript4
is suggesting syntax like,
package <name> {
...class declarations etc...
}
Maybe MM didn't get that memo? Interestingly the current draft
explicitly excludes syntax that AS2 uses ('get' and 'set' keywords).
> I hope that helps - and I"m interested to hear what you may think
I'm just an ActionScript2 newbie, and wanted to check I understood the
AsUnit packaging policy, as that should drive the documentation
structure. Here's what AsUnit API docs look like currently:
http://www.badgers-in-foil.co.uk/projects/as2api/examples/asunit/index.html
(There are bugs, like interfaces not being there; and I've not
implemented any type-resolution yet, so no inter-class links.)
thanks,
dave
--
http://david.holroyd.me.uk/
|