Hi,

I am trying to rewrite the FlashInspector to study AS3 (I know about the Xray tool, but it seems to big for what I need most of the time), but I am running into odd compile time behaviour.

I have the following code
Code:
package com.luminicbox.log
{
    public class Level
    {
        public static const ALL:uint = 0;
        public static const DEBUG:uint = 1;
    }
}
Code:
package com.luminicbox.log
{
    public class Logger
    {
        ...
        public function log(argument:*, level:uint = Level.ALL)
        {
            var txt:String = "";
            ...
            FlashConnect.trace(txt);
        }
    }
}
In the Main class I have the following code
Code:
package
{
    import com.luminicbox.log.*;
    import flash.display.Sprite;

    public class Main extends Sprite
    {
        var log:Logger = Logger.getLogger("myLogger");
        log.addPublisher(new FDTracePublisher());
        var num:uint = 10;
        log.log(num);
        var o:Object = new Object();
        o.name = "test";
        log.log(o);
        //var d:Date = new Date();
        //log.log(d);
    }
}
The commented lines cause the compiler to return an error, saying "Parameter initializer unknown or is not a compile-time constant." while pointing Level.ALL.
Odd, since it doesn't break when logging any numerical value, a String, an Object or a Sprite, only when I log a Date it fails saying a parameter has not been initialised.

Can anybody can help me clarify this?

I am using the free Flex2SDK, but I can't tell if this is Flex specific, so I have posted it here.