RE: [flexcoders] Re: Code Behind Woes
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?
RE: [flexcoders] Re: Code Behind Woes
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.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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas Sent: Tuesday, April 24, 2007 11:47 PM To: flexcoders@yahoogroups.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: flexcoders@yahoogroups.com on behalf of Doug Lowder Sent: Tue 4/24/2007 5:37 PM To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.com, Jim Grinsfelder [EMAIL PROTECTED] 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.com/2006/mxml; layout=absolute /app:myClass What did I neglect to do?
RE: [flexcoders] Re: Code Behind Woes
Oops, missed that, yes, the file name and class name must match. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug Lowder Sent: Wednesday, April 25, 2007 6: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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.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.com/2006/mxml http://www.adobe.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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Dimitrios Gianninas Sent: Tuesday, April 24, 2007 11:47 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.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: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com on behalf of Doug Lowder Sent: Tue 4/24/2007 5:37 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.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 flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.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.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute /app:myClass What did I neglect to do?
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: flexcoders@yahoogroups.com on behalf of Doug Lowder Sent: Tue 4/24/2007 5:37 PM To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.com, Jim Grinsfelder [EMAIL PROTECTED] 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.com/2006/mxml; layout=absolute /app:myClass What did I neglect to do? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. winmail.dat