Flex/Actionscript Editor Issue

The editor is indicating an error for assignment of a derived class to a base.  I have an mx.container.VBox which derives from mx.core.Container being passed to a method with a parameter of mx.core.Container, and the editor is saying the assignment is not allowed.

Edit:
Additional notes.  The import list includes mx.containers.VBox, but the intellisense is not reporting the proper methods and properties.... (idea_flex_intellisense_import_problem.png )



Matt S.



Attachment(s):
idea_flex_derived_class_import_problem.png
idea_flex_intellisense_import_problem.png
6 comments
Comment actions Permalink

Hi, Matt!
I guess that mx.containers.VBox class was resolved incorrectly by IDEA
for some reason. Try to look at type hierarchy for VBox (Ctrl+H when
cursor is inside 'VBox' word of import statement). Correct hierarchy is
Object - EventDispatcher - ... - Container - Box - VBox - ...
I suppose that you'll see something different (probably only VBox class
itself). Try to navigate to those classes that you'll see in hierarchy
(F4 or double click) and look at editor header. What files will you be
navigated to? Will there be anything red-highlighted in those files?

mx.containers.VBox should come from [Flex
SDK]/frameworks/libs/framework.swc (or sources [Flex
SDK]/frameworks/projects/.../VBox.as) and should be highlighted green.
Recreating Flex SDK attached to your module may help. Or look if some
'incorrect' VBox class appears in your module dependencies.

0
Comment actions Permalink

Alexander,

I have attached screenshots of the steps you suggested.  The superclass and interfaces for Label were not being resolved.  I deleted the SDK and recreated it and these issues seemed to have gone away.  One other thing to note is that the problem would randomly affect different framework classes.  When I first emailed this, it was affecting the VBox instances in my class.  After a restart of IDEA, it was affecting the Label instances in the same class, but VBox was ok.


Thanks,
m.



Attachment(s):
flex_resolve_component_3.png
flex_resolve_component_2.png
flex_resolve_component_1.png
0
Comment actions Permalink

Some fixes have been integrated recently so the latest EAP (10597) would likely be free of this issue.

0
Comment actions Permalink

unfortunately, I am seeing the same behavior in 10957 for this issue.

m.



Attachment(s):
10957_flex_resolve_component_4.png
0
Comment actions Permalink

May be it's the same problem as in another your thread "Flex: Import problems for SWC" and increasing "idea.max.intellisense.filesize" value in idea.properties file will help.

0
Comment actions Permalink

Yes.  Increasing the size noted in that property has addressed a number of issues in the class resolution inside the editor!


Thanks,
m.

0

Please sign in to leave a comment.