The mistake I made that vexed me yesterday was failing to place the over-riding class file into a sub-directory (folder) with the package name beneath the project in the navigator tree, so Flex couldn't find it. Once I did that, it worked fine.
I have to remember to put package files in a folder of the same name. I have to remember to put package files in a folder of the same name. I have to remember to put package files in a folder of the same name. : : I have to remember to put package files in a folder of the same name. _____ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug Lowder Sent: Wednesday, April 25, 2007 5:45 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Code Behind Woes Tracy, I'm assuming you have class MIPApplication defined in a file named MIPApplication.as. The original poster was defining class myClass in file myClassBase.as, which I don't think will compile; correct? --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > "you cannot extend Application" , no, you can defintely do this. The > limitation is that the subclass can only appear at the root of an mxml > file. > > I don't see what is wrong in the posted code. This is an example tht is > very similar and is working for me: > > <?xml version="1.0" encoding="utf-8"?> > <mipc:MIPApplication > xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml> com/2006/mxml" > xmlns:mipc="MIPContainers.*" > app="{this}" > > <mx:Style source="mip.css" /> > </mipc:MIPApplication> > > And MIPApplication.as starts off like this: > package MIPContainers > { > import mx.core.Application; > ... > public class MIPApplication extends le_MIP > { > "le_MIP" is an mxml application. Hmm, I am always extending an mxml > application, not the "Application" class, I wonder if that is the > difference? > Tracy > > -----Original Message----- > From: [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com [mailto:[EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com] On > Behalf Of Dimitrios Gianninas > Sent: Tuesday, April 24, 2007 11:47 PM > To: [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com > Subject: RE: [flexcoders] Re: Code Behind Woes > > I believe Doug is right, you will have to make sure the name of your > MXML component and AS class are different. But even at that, you cannot > extend Application because by doing so it will not generate the > appropriate hidden code at compile time to make your app work. What u > should do is extends Box, Panel, etc... and then drop those into your > app. > > Dimitrios Gianninas > Optimal Payments Inc. > > > > -----Original Message----- > From: [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com on behalf of Doug Lowder > Sent: Tue 4/24/2007 5:37 PM > To: [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com > Subject: [flexcoders] Re: Code Behind Woes > > File name/class name mismatch? I think you'll need to either change > your class name to "myClassBase", or change the filename > to "myClass.as". > > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com, "Jim Grinsfelder" <jim@> wrote: > > > > I'm confused again. I read Ted's thing on Code Behind and got all > excited. > > > > > > > > > > Now I'm getting "Unable to locate specified base > class 'app.myClass' for > > component class 'myClass' when I build the following: > > > > > > > > > > > > [file: myClassBase.as] > > > > package app > > > > { > > > > import mx.core.Application; > > > > > > > > public class myClass extends Application > > > > { > > > > } > > > > } > > > > > > > > > > > > [file: myclass.mxml] > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <app:myClass xmlns:app="app.*" > xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml> com/2006/mxml" > > layout="absolute"> > > > > > > > > </app:myClass> > > > > > > > > > > > > What did I neglect to do? > > >