Yes, indeed, this is a bug in FlexBuilder.  I just tried looking at my
app in Design mode and get the error you do. Rats.  I am still on 2.0,
are you on 2.0.1 yet?  If not cross your fingers and hope.

 

Is your real "AppParent", the one you extend, heavily graphical?  In our
case there are no visual elements in the base class, so theoretically we
could use the ordinary Application tag while we were in Design mode and
switch it to the base class to run/debug.  A PITA.

 

If we find it is still a bug in 2.01, lets both log a bug against it.
This is definitely an oversight where the UI team missed a valid
architecture.  

 

Or maybe someone here will have a workaround.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of helihobby
Sent: Tuesday, January 30, 2007 11:48 AM
To: [email protected]
Subject: [flexcoders] Re: Is it possible to Inheirt from an MX
Application inside of an MX Application ?

 

Thank you for taking the time to read this tracey.

In efforts to better explain, here is another example:
( Note that all files are in the same root folder )

----------------------
AppParent.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 
layout="absolute">
<mx:Button x="406" y="242" label="Button"/> 
</mx:Application>

----------------------
AppChild.mxml

<?xml version="1.0" encoding="utf-8"?>
<AppParent xmlns="*" xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 
layout="absolute">
<mx:Button x="371" y="243" label="Button"/> 
</AppParent>

Does not work since when going into Design Mode in FB I will get an 
error of: AppParent is an unknown tag

Also I tried the following ( with a c: Name Space )

----------------------
AppChild.mxml

<?xml version="1.0" encoding="utf-8"?>
<c:AppParent xmlns:c="*" xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 
layout="absolute">
<mx:Button x="371" y="243" label="Button"/> 
</c:AppParent>

FB does not show an error BUT will now show my button either and I 
can not drag any new components to the stage ...

HEEEEEEEEEELP :)

Thank you for all the help,

Sean.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> You might have found a bug in FB. This happened in the FB 1.5 
process,
> where the FB developers did not realize extending Application was a
> valid action. Happily I caught it early and it was fixed in the 
1.5 FB
> release. Many people are using "code behind". suggesting this is 
only
> an FB issue. Not that that makes it any better for you if you use 
design
> mode regularly!
> 
> 
> 
> Tracy
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of helihobby
> Sent: Monday, January 29, 2007 7:24 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: Is it possible to Inheirt from an MX
> Application inside of an MX Application ?
> 
> 
> 
> 
> But even if I do something as simple as:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <ApplicationSecure xmlns="*" 
> xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > "
layout="absolute" >
> <mx:Button x="284" y="202" label="Button"/>
> </ApplicationSecure>
> 
> And try to go to Design Mode in Flex Builder, I get an error of:
> An Unknown Item is declared in the root of your MXML.
> 
> HELP :(
> 
> Thanks,
> 
> Sean.
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> , "Andrew Trice" <andrew.trice@> 
> wrote:
> >
> > You don't need AddChild, that is only used within view states. 
When
> > extending an object, you can just add new elements. So, just add
> > <mx:Label /> instead of <mx:AddChild><mx:Label /></mx:AddChild>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > _____________________________________
> > 
> > Andrew Trice
> > 
> > Cynergy Systems, Inc.
> > 
> > http://www.cynergysystems.com <http://www.cynergysystems.com>
<http://www.cynergysystems.com <http://www.cynergysystems.com> > 
> > 
> > 
> > 
> > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice
<http://www.cynergysystems.com/blogs/page/andrewtrice> 
> <http://www.cynergysystems.com/blogs/page/andrewtrice
<http://www.cynergysystems.com/blogs/page/andrewtrice> > 
> > 
> > Email: andrew.trice@
> > 
> > Office: 866-CYNERGY 
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> 
> [mailto:[email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> ] On
> > Behalf Of helihobby
> > Sent: Monday, January 29, 2007 5:46 PM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%
40yahoogroups.com> 
> > Subject: [flexcoders] Re: Is it possible to Inheirt from an MX
> > Application inside of an MX Application ?
> > 
> > 
> > 
> > Thanks for the reply ...
> > Tried what you said but it seems like Flex will not allow you to 
> > inherit from your application.
> > 
> > If I try and do something like:
> > 
> > <?xml version="1.0" encoding="utf-8"?>
> > <h:ApplicationSecure xmlns:h="*" 
> > xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>
<http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> " >
> > 
> > <mx:AddChild position="lastChild">
> > <mx:Label text="Work"/>
> > </mx:AddChild> 
> > 
> > </h:ApplicationSecure>
> > 
> > OR also tried with no luck:
> > 
> > <?xml version="1.0" encoding="utf-8"?>
> > <ApplicationSecure xmlns:h="*" 
> > xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>
<http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> " >
> > 
> > <mx:AddChild position="lastChild">
> > <mx:Label text="Work"/>
> > </mx:AddChild> 
> > 
> > </ApplicationSecure>
> > 
> > Flex Builder will not allow you to go to Design Mode 
> > complaining "Error in line 2"
> > 
> > Any idea ...
> > 
> > :(
> > 
> > Regards,
> > 
> > Sean.
> > 
> > --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%
> 40yahoogroups.com>
> > , "helihobby" <helihobby@> wrote:
> > >
> > > Is it possible to Inheirt from an MX Application inside of an 
MX 
> > > Application ?
> > > 
> > > 
> > > 
> > > We wish to make two MX applications.
> > > 
> > > One called:
> > > 
> > > ApplicationSecure ( file name is ApplicationSecure )
> > > 
> > > and One called:
> > > 
> > > ApplicationMain ( file name is ApplicationMain )
> > > 
> > > 
> > > 
> > > 
> > > ApplicationSecure header looks normal such as:
> > > 
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>
<http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> " 
> > > layout="absolute" creationComplete="authenticate()"
> > > creationPolicy="all"
> > > xmlns:cc="dynaLib.common.components.*" >
> > > 
> > > <mx:Script>
> > > <![CDATA[
> > > ...
> > > 
> > > 
> > > 
> > > 
> > > 
> > > However we wish ApplicationMain Header to look as the following:
> > > 
> > > 
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <c:ApplicationSecure xmlns:c="*" 
> > > xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>
<http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> "
> ">
> > > 
> > > 
> > > ...
> > > 
> > > 
> > > </c:ApplicationSecure>
> > > 
> > > 
> > > So in ascence ApplicationSecure is inherting from Application.
> > > 
> > > ApplicationSecure will run first than ApplicationMain.
> > > 
> > > 
> > > 
> > > Everything seems ok, only that the compiler is comlaining that 
is 
> > can 
> > > not find any 
> > > of the MX components in its namespace path.
> > > 
> > > In other words, it is as if the ApplicationMain is ignoring the 
> > line: 
> > > xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> 
> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>
<http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > 
> 
> > > becauase we have instructed it to inherit from 
ApplicationSecure.
> > > 
> > > 
> > > 
> > > Any Help will be greatly appreciated.
> > > 
> > > Regards,
> > > 
> > > 
> > > Sean.
> > >
> >
>

 

Reply via email to