It should be creating it in the constructor. Is there a problem with doing it like that?
On Jul 28, 2016, at 11:51 PM, Alex Harui <aha...@adobe.com> wrote: > Harbs, > > I've started poking around in this branch. How is the SWF version > supposed to create the wrapped element? I would've expected createElement > to be used? Or is it somewhere else? > > -Alex > > On 7/28/16, 11:43 AM, "Alex Harui" <aha...@adobe.com> wrote: > >> >> >> On 7/27/16, 1:41 PM, "Alex Harui" <aha...@adobe.com> wrote: >> >>> >>> >>> On 7/27/16, 1:27 PM, "Harbs" <harbs.li...@gmail.com> wrote: >>>>>> The only class which still subclasses Sprite is Application. I don’t >>>>>> know >>>>>> a way around that. >>>>> >>>>> One idea is that, since developer code never instantiates an >>>>> Application >>>>> (only the framework does) that Application could be an interface. The >>>>> framework would instantiate the concrete class. >>>> >>>> Not sure how to go about this, but I’m not sure how bad it is for the >>>> main app to subclass Sprite. I’ll leave this for someone else. >>> >>> If we don't fix this, the Application code-hinting will show all the >>> Flash >>> stuff. >> >> Thinking about it more, Application can't be an interface since it is used >> in MXML. I will try to use [FactoryClass] and have the factory wrap >> itself with Application. I think right now that will add a "first-frame" >> to the SWF which FlexJS doesn't have right now (but Flex does). Anybody >> think that's a bad idea? >> >> -Alex >> >