Hello FlexCoders,

To Adobe guys: Is this a bug in Flex 1.5?

I spent 4 hours and I have just fixed that bug! :)

So it doesn't work in Flex because, of this (org.as2lib.regexp.Pattern):

static var ACCEPT:Node = new Node();
static var LASTACCEPT:Node = new LastNode();

A classes instance variables may only be initialized to compile-time
constant expressions!!!

And Flex compiler doesn't give us that error when we use "static"
variables. BUG?

So to fix this we just need to initialize this variables at
constructor for example, like this:

static var ACCEPT:Node;
static var LASTACCEPT:Node

public function myConstructor() : Void {
   if(!ACCEPT) {
      ACCEPT = new Node();
   }

   if(!LASTACCEPT) {
      LASTACCEPT= new LastNode();
   }
}


Best regards
Stanislav

On 3/31/06, Sergey Kovalyov <[EMAIL PROTECTED]> wrote:
> Dear Flexcoders,
>
> Are there any ways to make as2lib regexp in Flex? I use
> Pattern.matches("a*b", "aab") and it returns true in Flash, but either
> undefined or false in Flex. The same code works different. Could you
> please assist me with this issue.
>
> Regards, Sergey.
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to