The first one shouldn't compile because it violates the one-externally-visible-declaration-per-file rule of mxmlc; both public class Component and (internal) class Utility would be visible to code in other files, as long as it was within package com.teotigraphix.com.

 

In the second example, putting Utility outside the package statement makes it visible only to code in the same file.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Teoti Graphix
Sent: Monday, February 20, 2006 9:19 AM
To: [email protected]
Subject: [flexcoders] Flex2 Nested class/ internal Class question

 

Hello,

Does anybody know what or if there is a difference in the following; (Talking about the Utility class placement)

----------------------------------------------------------

package com.teotigraphix.core
{

   public class Component
   {
      public function Component()
      {
      }
   }

   class Utility
   {
   }

}

AND ....

----------------------------------------------------------

package com.teotigraphix.core
{

   public class Component
   {
      public function Component()
      {
      }
   }
}

class Utility
{
}

I noticed this changed in the change from alpha to beta. What is the difference, either way the compiler dosn't complain. I understand namespaces but, is this what would change for the last example? I have tried to look in the AS3 docs but, they are not finished yet ;-)

Peace, Mike








--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to