From 13c0830908db3a118651bace83db08044b414845 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 9 Mar 2006 22:23:07 +0000 Subject: [PATCH] Again updated note on constructors. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3933 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/README.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/as/com/threerings/README.txt b/src/as/com/threerings/README.txt index a4466016e..b488a98a3 100644 --- a/src/as/com/threerings/README.txt +++ b/src/as/com/threerings/README.txt @@ -214,13 +214,18 @@ ActionScript (like myArray.length) may actually be executing arbitrary code, possibly creating many objects, each time. -- Classes without a constructor cannot be instantiated. This is a runtime - error (grraah!). There is a compiler option "-compiler.warn-no-constructor" +- Classes without a constructor cannot be instantiated. This is a + runtime error (grraah!). + There is a compiler option "-compiler.warn-no-constructor" but it generates a flotilla of warnings from standard classes in the flash library, so it's slightly useless. ***Update: What the heck. I noticed today that DSet has no constructor and I've never had any trouble instantiating those. Why would not having a constructor be an error for some classes and not others? Grraahh! + ***Update: The language spec says that a default (no arg) constructor + is created implicitely if one is not defined. Probably when I got + the error that a class had no constructor it was some sort of compiler + bug. - Static initializers can be emulated: public class A