@Carlos
> Maybe we could update it to get the benefits in your implementation to
get best of both worlds.

I'll see what I can do from my end to integrate both approaches. I'll also
try to address some of the feedback I gathered here.

@Christopher
> Regarding the callback-functionality, I would prefer the event based
approach over the old one where you provide the callbac functionality.

There's nothing preventing us from providing both approaches. I never liked
that static function myself - which is why I created this Spark
implementation in the first place -, but who are we to tell people how to
instantiate alerts ;)

> As far as I understood it, I can still programatically create Alerts and
addEventListeners for the CloseEvents. I would really like to be able to
continue to be able to create Alerts programatically.

Yes you can:

var alert:Alert = new Alert("my title", "my message");
alert.addEventListener(PopUpEvent.CLOSE, handleAlertClose);
alert.show();

> Regarding the discussion of what Buttons the Allert should have, what
about implementing an abstract BaseAlert (or something similar that
contains a command-bar which can be filled with Buttons and a concrete
subclass Alert that mimics the functionality of the original Alert?

I already did it that way, kind of. Only the base class is a bit more
generic than what you describe: it is a SkinnablePopUp which you can extend
to add whatever you want. But perhaps I should consider adding another base
class as you suggest in between.

Max


On Tue, Jun 11, 2013 at 9:40 PM, Peter Ent <p...@adobe.com> wrote:

> For FlexJS, the Alert will have an AlertModel where the title, message,
> and button labels will be stored. The model is assigned via style sheet
> (or programmatically) and the model can be changed dynamically. If you
> wanted something different or more generic, it will be possible to extend
> the AlertModel and add whatever else you'd like and then extend or replace
> the AlertBead to handle the extra layout or items.
>
> Peter Ent
> Flex SDK Team
> Adobe Systems
>
> On 6/11/13 4:15 AM, "christofer.d...@c-ware.de"
> <christofer.d...@c-ware.de> wrote:
>
> >Regarding the callback-functionality, I would prefer the event based
> >approach over the old one where you provide the callbac functionality.
> >
> >As far as I understood it, I can still programatically create Alerts and
> >addEventListeners for the CloseEvents. I would really like to be able to
> >continue to be able to create Alerts programatically.
> >
> >Regarding the discussion of what Buttons the Allert should have, what
> >about implementing an abstract BaseAlert (or something similar that
> >contains a command-bar which can be filled with Buttons and a concrete
> >subclass Alert that mimics the functionality of the original Alert?
> >
> >Chris
> >
> >________________________________________
> >Von: Maxime Cowez [maxime.co...@gmail.com]
> >Gesendet: Montag, 10. Juni 2013 22:08
> >An: dev@flex.apache.org
> >Betreff: [DISCUSS] Alerts and dialogs in Flex 4.x / Spark (was: Alerts
> >and dialogs in FlexJS)
> >
> >As we were discussing some options in the thread "Alerts and dialogs in
> >FlexJS", we started to elaborate on dialog implementation in general. This
> >was carrying us away from the initial question so I started this new
> >thread.
> >
> >One of the initial topics was the possibility to declare Alerts/Dialogs as
> >mxml tags instead of using the old static function, something like this:
> >
> ><fx:declarations>
> >    <s:Alert id="alert" title="myTitle" text="myMessage"
> >close="handleAlertClose(event)"/>
> ></fx:declarations>
> >
> ><s:Button label="show alert" click="alert.open()"/>
> >
> >I mentioned that I had already created such an implementation, which can
> >be
> >found at https://github.com/RIAstar/SkinnablePopUpFx
> >There's also a live demo at http://riastar.github.io/SkinnablePopUpFx/
> >
> >Some people seemed to like the idea and asked some questions, which I'll
> >try to answer next.
> >
> >Max
>
>

Reply via email to