I believe this is a restriction brought on by the Adobe developers.
You cannot do this in MXML:
<mx:Panel id="panel">
<mx:Alert>
</mx:Alert>
</mx:Panel>
If you try to compile, you will get this message:
"Could not resolve <mx:Alert> to a component implementation."
To instantiate an Alert in MXML the proper coding would be:
<mx:Panel id="panel">
<mx:Button click="mx.controls.Alert.show('hello')"/>
</mx:Panel>
Basically I would like to create a similar component that would be
used for configuring some task modally and presumably extending it
off the Alert or TitleWindow component.
G'day Mike
--- In [email protected], Maciek Sakrejda <[EMAIL PROTECTED]>
wrote:
>
> Why do you need to prevent usage through MXML? MXML is compiled
down to
> ActionScript, so it's essentially just syntactic sugar. That is, by
> preventing using your components through MXML, you are just
removing a
> convenient interface, and not restricting functionality.
> --
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
>
> -----Original Message-----
> From: climbfar <[EMAIL PROTECTED]>
> Reply-To: [email protected]
> To: [email protected]
> Subject: [flexcoders] Extending Alert
> Date: Thu, 01 May 2008 14:18:55 -0000
>
> How do I extend the Alert class such that the new class cannot be
> created using MXML tags? Taking it a step further is it possible to
> create an ActionScript class extended from Panel that cannot be
> constructed using MXML tags?
>
> G'day Mike
>