Can’t see anything wrong with what you’ve given us. Does this [1] run for you?



BTW, feel free to post examples of problems (or successful runs) on that [1] 
repo.



[1] https://github.com/yishayw/Examples/blob/CurrencyFormatter/Examples.mxml



________________________________
From: Idylog - Nicolas Granon <ngra...@idylog.com>
Sent: Monday, November 6, 2017 2:35:28 PM
To: 'Harbs'; dev@royale.apache.org
Subject: RE: ApplicationComplete event not firing

You are right ! It does fire...unless some "silent" error happens while 
building the initial view !

We found that there was an error in the listener for the inner view 
"initComplete" event.
This "inner error" prevents the applicationComplete to fire.

But we do not understand why this error happens :

The "inner view" initComplete listener error is caused by the following 
statements :
        var cf:CurrencyFormatter;
        cf=new CurrencyFormatter();

It is the instantiation of the currency formatter which causes some problem 
(???).

After adding a try/catch block, we get this message from the error object :
        org.apache.royale.html.accessories is undefined

although, of course, we import it like this (import is generated by code 
assist) :
        import org.apache.royale.html.accessories.CurrencyFormatter;

What are we doing wrong ?


Nicolas Granon




> -----Message d'origine-----
> De : Harbs [mailto:harbs.li...@gmail.com]
> Envoyé : lundi 6 novembre 2017 12:53
> À : dev@royale.apache.org; ngra...@idylog.com
> Objet : Re: ApplicationComplete event not firing
>
> We are using applicationComplete and it definitely fires.
>
> If you post some code maybe I’d have some input.
>
> The event type for most events in Royale is Event. Some events have a
> payload and they have a different event type (such as ValueEvent), but
> events in Royale are much more generalized than Flex.
>
> HTH,
> Harbs
>
> > On Nov 6, 2017, at 12:01 PM, Idylog - Nicolas Granon
> <ngra...@idylog.com> wrote:
> >
> > (maybe this is not the right place for this kind of message ? let me
> > know)
> >
> > When running our (almost) Hello world application (JS target) it
> seems
> > that "applicationComplete" event does not fire.
> >
> > "preinitialize" and "initialize" events both fire.
> >
> > The application "viewChanged" event does not fire on initial load,
> but
> > maybe it fires only when the is a view *change*, not when the first
> > view in "initial view" loads ?
> >
> > Also, what is the class of these events ? Code assist shows the event
> > name, but not its class (???). For now, I declare them as "Event" but
> > I like to correctly type my arguments...
> >
> > Nicolas Granon
> >


Reply via email to