Skip navigation
Currently Being Moderated

Flex Hero: Number.MIN_VALUE in ctor gives compile error

Mar 18, 2011 9:10 AM

It's not a question, just a note, that I don't really understand what changed since Flex 4.1 that this doesn't compile.

 

public class ComplexType
{
     public function ComplexType(prop:Number = Number.MIN_VALUE)
     {      } }

 

 

1047: Parameter initializer unknown or is not a compile-time constant. ComplexType.as /HeroTestbed/src/com/cuketa/herotestbed line 5 Flex Problem

 
Replies
  • Currently Being Moderated
    Sep 23, 2011 8:27 AM   in reply to Tomas_Mirezko

    Just to note, this is still a problem in Flex 4.5.1. Sometimes I was able to replace Number.MIN_VALUE and Number.MAX_VALUE in my own code with 1E+100 and -1E+100 in parameter initializers, but sometimes Flex just decides that it's going to give the same error then. I'll replace it with "100" or something silly, let it build, and then replace is back with 1E+100 and it'll stop complaining.

     

    This is just rediculous!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)