Hi all,
Sorry I haven't had the chance to report this sooner but it appears that
Flex issues incorrect warnings when you extend the core Application
and/or Form classes and try to reference a component both in MXML and AS.
Case in point:
// ArpPizza.mxml
<pizzaView:Application
xmlns:pizzaView="com.ariaware.pizza.view.*"
xmlns:mxml="*"
xmlns:mx="http://www.macromedia.com/2003/mxml"
backgroundImage="@Embed('Graphics/design.gif')"
// ...
>
<mx:Canvas width="550" height="400">
<mx:LinkBar id="linkBar" x="360" y="14" />
<mx:ViewStack id="screens" x="38" y="59">
<mxml:OrderForm id="orderForm" label="Order Form" />
<mxml:ViewOrdersForm id="viewOrdersForm" label="View Orders" />
</mx:ViewStack>
// ...
Note: ViewStack contains the two forms with ids set to orderForm and
viewOrdersForm.
class com.ariaware.pizza.view.Application extends mx.core.Application
{
//
// On stage
//
private var screens:mx.containers.ViewStack;
private var linkBar:mx.containers.LinkBar;
private var orderForm:OrderForm;
private var viewOrdersForm:ViewOrdersForm;
private var dataPreloader:ProgressBar;
// etc.
* * *
Actual behavior:
4 Warnings found.
Warning /ArpPizza.mxml:22
The member, viewOrdersForm, hides a member in ancestor class,
'com.ariaware.pizza.view.Application'.
Warning /ArpPizza.mxml:21
The member, orderForm, hides a member in ancestor class,
'com.ariaware.pizza.view.Application'.
Warning /ArpPizza.mxml:22
The member, viewOrdersForm, hides a member in ancestor class,
'com.ariaware.pizza.view.Application'.
Warning /ArpPizza.mxml:21 The member, orderForm, hides a member in
ancestor class, 'com.ariaware.pizza.view.Application'.
* * *
Expected behavior: No warnings should be given as we are not hiding a
member (we are simply referring to the same member, once in MXML and
once in AS2.) This is exactly what we do in Flash when we give a
component an instance name and then declare it in the form's class.
I know the Flex MM team frequent this forum so I thought I'd send this
over here. If you need the full app to test with, just let me know.
Thanks,
Aral
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/