Results 1 to 6 of 6

Thread: Problems: Change Flex 3 Project to Flex 4

  1. #1
    Join Date
    Dec 2010
    Posts
    4

    Default Problems: Change Flex 3 Project to Flex 4

    Hi

    I try to change my old Flex 3.5 Project to a Flex 4 Project.

    Infos to my Project:
    Backend: Java Based
    Frontend: Flex Project
    Spring Source includes the Flex Builder Licence

    I changed the sdk in spring source:
    Window > Preferences > Installed Flex SDKs

    I changed the flex sdk reference in the file:
    project.properties >> FLEX_HOME

    I changed in all mxml files the flex libs to followings:
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"

    I removed all old css styles.


    problems:

    Spring Source has problems to identify the fx tags.

    e.g. the code within <fx:Script></fx:Script> is just only black no highlights.

    when I try to bind a variable, which is defined in the script area, will not detect in the Label.

    also Error message in Spring Source:
    Description Resource Path Location Type
    „C:\Program Files\springsource\flex_sdk_4.1.0.16032\frameworks \libs\player\9.0\playerglobal.swc“ konnte nicht geöffnet werden GraphicalETL Unknown Flex Problem


    while runtime my project has also problems to fill the Labels:
    ERROR:
    ReferenceError: Error #1069: Property languageLocator not found on GraphicalETL.view.mainscreens.LoginScreen and there is no default value.

    Source:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    width="100%" height="100%"
    initialize="{onInitialize(event);}"
    creationComplete="{onCreationComplete(event);}"
    >

    <fx:Script>
    <![CDATA[
    imports....

    [Bindable]
    private var languageLocator:LanguageLocator;

    /**
    * Initialization
    */
    private function onCreationComplete(pEvent:FlexEvent):void{
    languageLocator = LanguageLocator.getInstance();
    ...}
    ...
    ]]>
    </fx:Script>

    <s:Panel verticalCenter="0" horizontalCenter="0"
    title="{languageLocator.currentLanguageXML.loginSc reen.title.text().toString()}">
    <mx:Form>
    <mx:FormItem width="100%" label="{languageLocator.currentLanguageXML.loginSc reen.user.text().toString()}" required="true" tabIndex="1">
    <s:TextInput id="userName" width="100%" focusEnabled="true"/>
    </mx:FormItem>
    ...
    </mx:Form>
    </s:Panel>
    </mx:Canvas>



    has someone expierence with changing the project to flex 4??

    thanks for any advice....
    best regards
    julia

  2. #2

    Default

    I've done this a couple of times without a problem (other than the IDE not being totally stable) on Snow Leopard.

    Did you start from an STS version of the IDE? Do you have the Flash Builder 4 plugin in your dropins folder? What O/S are you on?

    You should be able to change the sdk version directly from within the IDE. You also have the <![CDATA[ ] block within <fx:Script>, yes?

    If all else fails, you might also want to try creating a new Flash Builder project and copying the files from your old project into it.
    Last edited by Slidewayz; Dec 29th, 2010 at 12:06 PM.

  3. #3
    Join Date
    Dec 2010
    Posts
    4

    Default

    Hi

    thank you for your reply!!

    SpringSource is running on Win XP installed in a virtual machine (vmware fusion) and this is running on the current version of OSX.

    "Did you start from an STS version of the IDE? "
    What does STS mean??

    "Do you have the Flash Builder 4 plugin in your dropins folder? "
    Hmmm no I´m using the old Flex Builder version.
    How could I deinstall the flex builder version and install the new flash builder 4 version?
    that will be the first thing I have to change now....

    "You should be able to change the sdk version directly from within the IDE. "
    You mean that I have to change just only the sdk in the preference panel??
    Window > Preferences > Installed Flex SDKs
    And not also in the properties file??
    project.properties >> FLEX_HOME

    "You also have the <![CDATA[ ] block within <fx:Script>, yes?"
    YES.

    "If all else fails, you might also want to try creating a new Flash Builder project and copying the files from your old project into it."
    I created an new dummy project and the application class look like this:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    </mx:Application>

    nothing changed!!

    also when I create new mxml components it creates a component with the old style and libriaries.

    best regards
    julia

  4. #4

    Default

    Hi Julia,

    STS is SpringsourceToolSuite. Since I also do java development on the back end, I find it more convenient than trying to mod Flash Builder.

    I think you will probably need Flash Builder or the Flash Builder plugin in order to use the Flex 4 features.

  5. #5
    Join Date
    Dec 2010
    Posts
    4

    Default New Problems

    Hi Slidewayz

    I managed the change from Flex 3 to Flex 4.
    thanks for your advices, which gave me the points I had to look for.
    the main point was to change the flex builder 3 licence to flash builder 4 licence.

    Now I have other problems....

    for the change from Flex 3 to Flex 4 I changed a lot of classes, cause the flash builder showed me a lot off errors and warnings.

    Flash Builder want me to change also the package names.
    And after that I have problems to compile my project.

    ____________________________

    Project structure:

    MyProject
    >>Backend (java)
    >>>>src
    >>>>build.xml
    >>>>...
    >>Frontend (flex)
    >>>>...
    >>>>assets
    >>>>src
    >>>>>>com
    >>>>>>>>...
    >>>>>>>>views
    >>>>>>>>>>MyComponent.mxml
    >>>>>>Main.mxml

    ____________________________

    Example 1 (Main.mxml):

    <s:Application
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:ns="http://ns.adobe.com/cairngorm"
    xmlns:views="com.views.*" <<<Important line
    >
    <views:MyComponent/>
    </s:Application >

    Problem:

    Spring Source Toolkit/Flash Builder 4 shows a lot of errors, e.g.:
    <views:MyComponent> Couldn´t solved as component implementation (translated from german).

    Ant Build (Backend >> build.xml):
    Compiling Successfull!!!

    ____________________________

    Example 2 (Main.mxml):

    <s:Application
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:ns="http://ns.adobe.com/cairngorm"
    xmlns:views="Frontend.src.com.views.*" <<<Important line
    >
    <views:MyComponent/>
    </s:Application >

    Problem:

    Spring Source Toolkit/Flash Builder 4:
    Without errors

    Ant Build (Backend >> build.xml) shows a lot of errors, e.g.:
    <views:MyComponent> Couldn´t solved as component implementation (translated from german).
    Compiling FAILED!!!

    build.xml:
    The following error occurred while executing this line:
    <antcall target="build_swf">
    <param name="outputdirectory" value="../Frontend/target" />
    <param name="file" value="../Frontend/src/Main.mxml" />
    </antcall>


    Any advice???
    Last edited by juwu; Jan 4th, 2011 at 06:06 AM.

  6. #6
    Join Date
    Dec 2010
    Location
    Singapore
    Posts
    302

    Default

    For your first problem, is this what you are facing http://stackoverflow.com/questions/3...implementation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •