Skip to main content
Participating Frequently
August 30, 2010
Question

Shifting Flex project from Flex SDK 3.5 to Flex SDK 4.0

  • August 30, 2010
  • 2 replies
  • 17072 views

Hi,

I am currently working on a Flex project using Flex 3.5 SDK. I want to shift my project to Flex 4.0 SDK.

When I changed the project settings to use SDK 4.0, I got lot of unknown location errors.

1) 1046: Type was not found or was not a compile-time constant: ImportExportConfiguration

2) 1061: Call to a possibly undefined method setSelection through a reference with static type mx.core.ITextInput

While the same code of flex was working satisfactorily in Flex SDK 3.5.

Please tell, how can I get rid of these error and successfully shift my project to Flex SDK 4.0.

Regards,

Nitika Agarwal

This topic has been closed for replies.

2 replies

Nitika_AgAuthor
Participating Frequently
September 21, 2010

Hi,

While I am migrating my project from flex 3.5 to Flex 4, I have to keep the Flex 3 compatibility mode off and theme as Flex 4 default theme that is Spark.

Then while i compile I get foloowing errors:

The   style 'backgroundAlpha' is only supported by type 'mx.controls.TextInput'   with the theme(s) 'halo'.
The style 'backgroundColor'   is only supported by type 'com.app.model.WLSMSTextArea' with the theme(s)   'halo'.
The style 'borderColor' is   only supported by type 'mx.controls.ComboBox' with the theme(s) 'halo'.
The style 'borderThickness'   is only supported by type 'mx.containers.Canvas' with the theme(s) 'halo'.
The style 'cornerRadius' is   only supported by type 'com.app.model.WLTextInput' with the theme(s) 'halo'.
The style 'cornerRadius' is   only supported by type 'mx.controls.TextArea' with the theme(s) 'halo'.
The style 'fillAlphas' is   only supported by type 'mx.controls.Button' with the theme(s) 'halo'.
The style 'fillAlphas' is   only supported by type 'mx.controls.ComboBox' with the theme(s) 'halo'.
The style 'fillColors' is   only supported by type 'mx.controls.Button' with the theme(s) 'halo'.
The style 'fillColors' is   only supported by type 'mx.controls.ComboBox' with the theme(s) 'halo'.
The style 'themeColor' is   only supported by type 'com.app.model.WLSMSTextArea' with the theme(s)   'halo'.
The style 'themeColor' is   only supported by type 'com.app.model.WLTextInput' with the theme(s) 'halo'.

What is the resolution for these, as for most of the controls there is no substitute to these properties. If I do not want ot change my <mx:> controls to <s:>controls because it will hamper my UI look and field, which I cannot afford to do.

I have added following lines at the beginning of my stylesheet (*.CSS) as well:

     @namespace "http://www.adobe.com/2006/mxml";


    @namespace "library://ns.adobe.com/flex/mx";
   
    @namespace s "library://ns.adobe.com/flex/spark";

     Button { .... }

     ........ / * other styles */

Please help me on this.

Regards,

Nitika

Known Participant
September 29, 2010

Hi,

     For resolving these issue you can perform the following workaround:

      1. Go to your project build path,select source path tab and in add folder add your flex 4.0 sdk theame location on my system it is

          c:\p.f\adobe\fFlashbuilder\sdk\freamwork\theme

       After that a source folder is created in your project path

  2.  In comipler option add -theme=Halo/halo.swc in additional compiler argument option.

Amazingly your prblem will be solved

Thanks

Gaurav Kumar Pandey

Nitika_AgAuthor
Participating Frequently
September 29, 2010

Hi,

Thanks for your reply, but this dnt solve the problem.

I am using some of the substitutes of from spark library for e.g. focuscolor inplace of themecolor, contentBackgroundalpha insteas of backgroundAlpha.

So if I use halo theme option I get errors on these properties.

And I have replaced those properties in my entire application which is very huge.

I get all warnings on all CSS styles that I use from flex 3.

Isn't there a workaround to let the application use both the themes, or styles from both the themes.

I just have to get rid of those warnings, and let my application look the same as it was in case of Flex 3.

I get warning in my CSS file as:

-     CSS type selectors are not supported in components: 'flexlib.containers.WindowShade.shade'


-      CSS type selectors are not supported in components: 'global'

-      CSS type selectors are not supported in components: 'mx.containers.ApplicationControlBar.appcontrolbar'

-      CSS type selectors are not supported in components: 'mx.containers.Canvas.bottomCanvas'

   where shade, appcontrolbar, bottomCanvas are my custom styles that i made for mx components in Flex 3.

Thanks

Nitika

August 30, 2010

It sounds like you have been using an outdated version of TLF with Flex 3.5. With the shipping version of TLF 1.0 you'll find in Flex 4.0 there is no longer an ImportExportConfiguration class and the function you're using on ITextInput is now called selectRange(). So what you need to do is update your code to the shipping TLF APIs.

Nitika_AgAuthor
Participating Frequently
August 30, 2010

Hi Alan,

Thankyou for your reply.

But one thing:

Can you just elaborate on how to update the code to the shipping TLF APIs..a step wise description

I am all new to Flex, so need a bit more of explanation from you on this.

Regards,

Nitika Agarwal

August 30, 2010

We unfortunately do not have a step-by-step recipe for converting code based on our prerelease labs API to the shipping API.

The main documentation page is here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html

(you can set the products and runtime filters to what's appropriate for your project)

If there are things that you can't figure out from the docs please post code snippets here and I'll try to help.