There should have been another error indicating that there were two public definitions in the file (one for dummyClass and one for the public var foo).  I’m not sure that the red X will show up for that though.  Sometimes you need to just look in the problems panel, the red X’s may not know where to go.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Prakaz
Sent: Saturday, October 07, 2006 12:26 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Error(s) not shown as error(s)

 

Hi Everybody,

 

I just came across this strange problem where errors in Flex code are not shown as errors!

 

Let me explain:

  1. Create a simple class [dummyClass.as]
    package com.some.package.path
    {
     public class dummyClass
     {
      private var str:String;
      public function dummyClass():void{ // Constructor
       str="test string";
       trace(str); // trace the text
      }
     }
    }
    This works fine, lets go to the next step
  2. Add some errors to the class
    package com.some.package.path
    {
     public class dummyClass
     {
      private var str:String;
      public function dummyClass():void{ // Constructor
       error_variable1 ="test string";
    // Access of undefined property error_variable1
       error_variable2="test string"; // Access of undefined property error_variable2
       error_variable3="test string"; // 1 more error
       str="test string";
       trace(str); // trace the text
      }
     }
    }
    Flex Builder shows a red cross sign  x  preceding the three indicating that there is something wrong there
  3. Now add a variable declaration ouside the scope of the class
    package com.some.package.path
    {
     public var foo:Boolean; // Some declaration added outside the scope of the class (by mistake)
     public class dummyClass
     {
      private var str:String;
      public function dummyClass():void{ // Constructor
       error_variable1="test string";
    // This line is no more displayed as an error by Flex Builder
       error_variable2="test string";
    // Neither is this one
       error_variable3="test string";
    // Nor this
       str="test string";
       trace(str); // trace the text
      }
     }
    }

Now, here is where the problem starts

Those three lines of code are no more shown as errors. The red cross just disappears as soon as you add the variable declaration outside the scope of the class dummyClass.

I happened to add that variable by mistake and everytime I ran the application it would say that there are error(s). I ran through every class and there was no indication(the red cross) whatsoever that there was a problem anywhere.

 

After losing some hair i managed to find that variable declaration. And as soon as i commented that line, all red crosses re-appeared again! walla!!

 

I dont know if its only me or if someone else has has come across this issue. Could you guys let me know if the same thing happens at your end?


 

 

Thanks

 

P


 

__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to