Conclusion: If you have "Error #1034: Type Coercion failed" error and you don't know why, try to load this class in the main application first.
To test, you can put the class directly in your main application. If now it's working, that was your problem. Solution, use RSL and/or link-report to load duplicated class in your main application first. Thank you Alex Harui and Robert Cadena for you help. David www.ideeclic.com --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > I use link-report to be sure that there is no duplication of classes. > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of nxzone > Sent: Wednesday, March 28, 2007 11:22 AM > To: [email protected] > Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed : > > > > My question was more why should I use link-report? If i have a RSL > library, each module or application that link this RSL will not export > class that are inside this RSL. So what is the difference? > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > RSLs contain code to load (so do modules). > > > > link-report is a list of classes that don't need to be in a module > > because you guarantee they'll be found elsewhere. THis makes your > > modules smaller so they load faster. Usually you need both when using > > modules and RSLs > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of nxzone > > Sent: Wednesday, March 28, 2007 10:35 AM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed > : > > > > > > > > You are right. Now i use a generic library (myLib.swc) as RSL. The RSL > > is loaded first and my problem is solve... > > > > I can use RSL or link-report to load repetitive class, but what is the > > advantage to use link-report? > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > , "Alex Harui" <aharui@> wrote: > > > > > > Because it is a common problem. Try putting a ToggleButtonBar in the > > > main app first to prove it one way or another. > > > > > > ________________________________ > > > > > > From: [email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > [mailto:[email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > ] On > > > Behalf Of nxzone > > > Sent: Tuesday, March 27, 2007 2:36 PM > > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > > Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion > failed > > : > > > > > > > > > > > > Why you think this bug is due to this cause? Why loading the shared > > > content before should solve the "Type Coercion failed: cannot > convert > > > mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar" ? > > > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > > , "Alex Harui" <aharui@> wrote: > > > > > > > > Check out the shared code portion of my modules presentation at > > > > blogs.adobe.com/aharui > > > > > > > > ________________________________ > > > > > > > > From: [email protected] > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > > [mailto:[email protected] > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > > ] On > > > > Behalf Of nxzone > > > > Sent: Monday, March 26, 2007 2:27 PM > > > > To: [email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > > > Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion > > failed > > > : > > > > > > > > > > > > > > > > Same problem ... > > > > Line 158 of ButtonBarButtonSkin.as... (parent.parent is a > > > > ToggleButtonBar not a buttonbar) > > > > var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null; > > > > > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> > > > <mailto:flexcoders%40yahoogroups.com> > > > <mailto:flexcoders%40yahoogroups.com> > > > > , "lrhazi" <lrhazi@> wrote: > > > > > > > > > > I get this annoying error often: > > > > > > > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > > > > > mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar > > > > > > > > > > My app uses Modules and has a user login/logout functionality... > I > > > get > > > > > the above error systematically when i logout of an account and > > login > > > > > to a second one. > > > > > > > > > > Any hints on what to look for? > > > > > > > > > > Thank you very much. > > > > > Mohamed~ > > > > > > > > > > > > > > >

