From Paul (who wrote the binding support in 2.0)

 

For now, analzying the catalog.xml files seems like it will work fine.

Alternatively, he could compile an application with the components in it and then look for the WatcherSetupUtil's in the generated SystemManager class.  Either way, once the list is discovered, manually initializing the WatcherSetupUtil classes after calling

ApplicationDomain.getDefinition() seems like the only option to simulate what a generated SystemManager would do for a component used in the top level SWF.

 

As far as why these classes are initialized in the generated SystemManager, we do this because we need them to be initialized pretty much at the same time the component class is initialized, but we can't reference the WatcherSetupUtil class in the component, because the WatcherSetupUtil can't be generated until after the component class is done compiling.  This is the replacement for the two pass compilation in Flex 1.X.  The frameEndHandler is not important.  It's just where the SystemManager happens to do it's thing and it was an easy place to insert the WatcherSetupUtil initialization.

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of maxym.hryniv
Sent: Friday, September 08, 2006 12:29 AM
To: [email protected]
Subject: [flexcoders] Re: Fw: WatcherSetupUtil issue

 

Thank you for reply.
I described allready that I create flex-library (.swc) for every
component and I get needed classes using
ApplicationDomain.getDefinition(). So SystemManager doesn't know
about these classes and doesn't initialize binding for them.

I had conversation with Manish Jethani and we found the solution - I
can analyze catalog.xml for every swc, find all *WatcherSetupUtils
and initialize them when I'm loading the library.

But can you give me the reason why binding initialization is
performed in the frameEndHandler? It's hard dependency of components
to generated code and my issue it's the one of many possible bugs
that such dependency can involve. It's a kind of logic that has to be
executed before first load of the component (in static constructor
emulation).

--- In [EMAIL PROTECTED]ups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> It'd be for any MXML class that has binding in it. So there must be
> errors with how binding is initializing based on how your system is
set
> up. Are you using the techniques for modules that Roger mentioned
in
> his blog postings?
>
>
>
> Matt
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]ups.com
[mailto:[EMAIL PROTECTED]ups.com] On
> Behalf Of maxym.hryniv
> Sent: Wednesday, September 06, 2006 11:49 PM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] Re: Fw: WatcherSetupUtil issue
>
>
>
> Hey!!.... Flex framework developers. Can you give some information
> about *WatcherSetupUtil.as? I really want for what it's generated?
>
> --- In [EMAIL PROTECTED]ups.com
<mailto:flexcoders%40yahoogroups.com>
> , "maxym.hryniv" <mokus@> wrote:
> >
> > Any ideas???
> > --- In [EMAIL PROTECTED]ups.com
> <mailto:flexcoders%40yahoogroups.com> , "maxym.hryniv" <mokus@>
wrote:
> > >
> > > Hi, coders.
> > > I'm trying to create multimodule (multi swf) application. I'm
> using
> > > next approach: I create flex library for every component. In
> > runtime
> > > main application loads needed library then gets needed
component
> > > definition using ApplicationDomain.getDefinition().
> > > I have next issue: some of components are not properly
> initialized
> > > and null pointer exception is thrown. For each of these
> components
> > > flex generates _{packageName}_{className}WatcherSetupUtil.as
> class.
> > > Other components work fine.
> > > I found some logic in SystemManager that can correct this:
> > > // trace("initializing mixin " + mixinList[i]);
> > > var c:Class = Class(getDefinitionByName(mixinList[i]));
> > > c["init"](this);
> > > If I add such logic for every class that has
*WatcherSetupUtil.as
> > > generated, everything works fine.
> > >
> > > Of course I can try to initialize *WatcherSetupUtil for every
> class
> > > that I get from external ApplicationDomain, but if component
has
> > > child component with *WatcherSetupUtil it will not work.
Because
> I
> > > cannot proxy child creation in mxml component.
> > >
> > > So the question is: "How i can determine classes with
> > > *WatcherSetupUtil.as generated in runtime?", and "What the ***
is
> > > WatcherSetupUtil? I cannot find any reference in help,
livedocs,
> > > flexcoders, google.".
> > > Thanx in advance for any help, ideas.
> > >
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to