> I used include instead and it worked.

It did??  That's odd.  Are you sure you don't mean "import"?

Each MXML file generates a class.  Script snippets are simply added to
that class, including stuff included with "include".  If these script
snippets are a class definition, you're basically adding an inner class,
which we don't support in this version.

Import, on the other hand, tells it that you're just giving access to
the other class.

Sorry to be pedantic here, but I'm curious about what you did that
worked...

-rg

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Clint Willard
> Sent: Wednesday, April 05, 2006 5:25 PM
> To: [email protected]
> Subject: [flexcoders] Re: [A]F2B2: Classes must not be nested??
> 
> You are correct. Flex 2.0 obviously does not let you use a class in
> the source parameter of script. I used include instead and it worked.
> Thanks.
> 
> 
> --- In [email protected], "Clint Willard" 
> <[EMAIL PROTECTED]> wrote:
> >
> > 
> > What is this error message mean exactly:
> > 
> > Classes must not be nested
> > 
> > I've search and found the error code but no discription, 
> reason why, or
> > any solutions. The class is not nested that I know of:
> > 
> > class ShoppingCart{
> > 
> >      var items : Array;
> >      var total : Number = 0;
> > 
> >      function ShoppingCart() {
> >          items=new Array();
> >      }
> > 
> >      function....
> > 
> > }
> > 
> > Called from a Flex 1.5 coded Flex Store converting to Flex 2.0 b2:
> > 
> > <mx:Application xmlns:mx= "http://www.adobe.com/2006/mxml
> > <http://www.adobe.com/2006/mxml> " xmlns="*"
> >      initialize="initApp()"
> >      verticalGap="0"
> >      pageTitle="FlexStore">
> > 
> >      <!-- The ActionScript code for this class is externalized -->
> >      <mx:Script source="ShoppingCart.as"/>
> >
> 
> 
> 
> 
> 
> 
> --
> 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