tags:

views:

190

answers:

2

Hi,

I'm a wee bit stuck on this, and was hoping you might have some input to help me.

I'm getting the "Could not resolve * to a component implementation." error message. However, everything I've read about this via Google hasn't helped my case in the slightest. I presume I'm just missing something obvious, but maybe its something more serious.

So, to solve this problem, I've tried two things, and both work, as far as they take me. First, I added a new component, of the exact same variety, and then copied the contents of the erroring component into it. I replace the viewstack 'page' with the new component (which as near as I can tell is IDENTICAL, but with a different name), and the compiler error goes away.

I can also solve this by simply renaming the original component & letting FB4 refactor for me. The error goes away again. But if I then re-rename back to the original name, I get the compiler error again.

I've tried to clean the project several times, and that doesn't help. Neither does deleting the workspace, and re-importing the project.

I'd really like to understand what I've done wrong here. What am I missing?

Thanks much!

A: 

Try the following:

  • Right-click on your project in the Package Explorer.
  • Select "Properties" in the pop-up menu (last item).
  • Click "Flex Library Build Path"
  • Click the "Classes" tab

Try to find the name of your new component in there. If you do, see if it is checked or not. If it is not, check it. That should solve the problem right there, but you may have to clean and (sometimes) quit FB4 and relaunch.

Robusto
I'm afraid that I don't see that. In flashbuilder 4, I get to "properties"...and after that our paths diverge, no "Flex Library Build Path"I do have a "Flex Build Path" however, but clicking on that does not turn up a "Classes" tab, and quickly browsing for one, I couldn't find it.
reidLinden
searching for "classes" in the little search dialog also turns up nothing.
reidLinden
The original poster is referring to a Flex Library Project. The dialog is intended for you to specify which file should be compiled into the SWC. There would not be a "class list" for a Flex Project; as when creating a SWF you want to put all files in there.
www.Flextras.com
A: 

Usually errors like this means you have two components named similarly and the compiler couldn't tell which one you wanted to use.

Do you have another component with the same, even in a different package? Or do you have a variable in your component the same name as the component? Be sure to check your SWCs and/or Library projects.

I'm assuming this is a compile time error; is that correct?

www.Flextras.com
Yes, its a compile time error.As far as I can tell, there are no other components with that name. The namespace is reasonably new (as is the entire project).Hmm..wait, that makes me think of something. I first got this error after removing all the script from OrderEntryView_2_Cart.mxml and placing it into a file OrderEntryView_2_Cart.as which is then sourced into the mxml file. One thing I haven't tried yet, is changing the name of THAT file. I didn't think of changing that file, because, its just an AS file...not a class or anything. Never even crossed my mind that it might conflict
reidLinden
well, I'll be....that was the problem. I renamed the actionscript file, relinked, and Voile! I'm good to go!Thanks for asking a question that pointed me in the right direction!
reidLinden
What I'm not understanding, however, is, why is the compiler picking up the ActionScript 'file' and treating it like a component? There's no class declaration there.
reidLinden
I don't know, but if I had to theorize, there is a reason that paths / filenames must tbe the same as packages / class names. Having two files name the same probably confuses a "pre-file parse" lookup of sorts.
www.Flextras.com