I'm migrating a FlashBuilder project (actually a project I'm working on with FlexBuilder eclipse plugin on Linux) to use FDT. I managed to import the project, and make it aware of other projects it depends on.
However I get lots of compile errors for things that seem harmless (and used to compile). At least, for example :
<mx:SomeClass initialize="{this.init()}" ... >
<mx:Script>
<![CDATA[
....
public function init() : void {
// ... whatever
}
public function foo(event : Event) : void {
// .. whatever
}
]]>
</mx:Script>
<mx:SomeOtherComponent click="{this.foo(event)}"/>
... etc ....
So, I get "unresolved function" for all the calls of the form someAttribute="{this.someFunction()}", even though the function is described in the same block file.
Is it that I've been abusing AS3 / FlashBuilder for all this time ?
Also, generic components have problem. Assume I have a class with a deferred 'content' attribute, and I want to instanciate this class and "fill the blank" :
I define a custom component in a CustomComponent.mxml file, with a deferred content
<mx:VBox>
<mx:Script>
<![CDATA[
public var content : IDeferredInstance;
public function buildMe() : void {
this.addChild(content.getInstance() as UIComponent);
}
I extend the custom component in another xml file, putting something as the content (namespace is just the name of the namespace that contains the CustomComponent file)
<namespace:CustomComponent xmln:namespace="..." >
<namespace:content >
<!-- Whatever ... -->
</namespace:content >
</namespace:SomeClassWithDeferredInstance >
Then again, I get an "Can't resolve 'content'" error in the second file (at the line that reads namespace:content).
Things to mention :
- I'm using FDT 4.0, under Linux, with a (valid) eval key
- I'm using a custom Flex 3.5 SDK (not one shipped with FDT, but not a too strange one either)
Hoping anyone can help ...
Thanks
PH