`
ch19880311
  • 浏览: 27261 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Flex SDK 升级的常见问题

    博客分类:
  • Flex
阅读更多
Flex 3.5 to Flex 4 migration errors and solutions

1. Declaration of style 'direction' conflicts with previous declaration in C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\framework.swc(mx.controls:ComboBox).

Solution: Use the new flexlib.swc, ilog-elixir-enterprise.swc, ilog-elixir-enterprise_rb.swc in cfiChart\libs.

2. Incorrect number of arguments.Expected 3. stroke.apply(target), fill.begin(g)

Solution: Change to var rc:Rectangle = new Rectangle;
stroke.apply(target, rc, new Point(rc.left, rc.top));
fill.begin(g,rc,new Point(rc.left, rc.top));
Need to import flash.geom.Rectangle and flash.geom.Point

3. The style 'borderSides' is only supported by type 'com.ssc.cfi.publicviews.CustomizedListBase' with the theme(s) 'halo'.

Solution: Change the default theme to Halo in the Properties -> Flex Theme panel.
For other projects without this option, add <theme themeIsDefault="false" themeIsSDK="true" themeLocation="${SDK_THEMES_DIR}/frameworks/themes/Halo"/> to .actionScriptProperties under </compiler>.

4. Unable to open 'C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles\en_US\src' cfiCairngorm

Solution: change C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles\en_US\src
to C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles\en_US

5. Type 1061: Call to a possibly undefined method getResourceBundle through a reference with static type Class.
Type not found issue of mx.data.DataService.  (cfiCairngorm)

Solution: Change cairngorm to at least cairngorm 2.2.2 since those issues were resolved in this version.

6. Unable to resolve resource bundle "data" for locale "en_US".

Solution: Copy data.properties from C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\3.5.0\frameworks\projects\framework\bundles\en_US\src to C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles\en_US
Add C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles\en_US to properties-> Flex Build Path->Source path

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

Solution: Change var textLength:int = this.textInput.length; this.textInput.setSelection(textLength,textLength); to this.textInput.selectRange(this.textInput.selectionAnchorPosition, this.textInput.selectionActivePosition);

8. Access of undefined property null. Dates.mxml

Solution: Remove parseFunction="null" in mx:DateField

9. Access of undefined property PropertyChangeEvent. SSCChartBase.as

Solution: import mx.events.PropertyChangeEvent

10. Copy the newest fds.swc and fds_rb.swc to C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs

11. Change HaloDefaults.init() to HaloDefaults.init(StyleManager.getStyleManager(FlexGlobals.topLevelApplication.moduleFactory))
HaloDefaults.createSelector(selector) to HaloDefaults.createSelector(selector,StyleManager.getStyleManager(FlexGlobals.topLevelApplication.moduleFactory))

12. In SSCFlexComponents  SSCAccordionBase.as
Replace mx.graphics.RoundedRectangle with mx.geom.RoundedRectangle
Add variable definition: private var overlayColor:uint;

13. VerifyError: Error #1053: Illegal override of FlexModuleFactory in mx.core.lexModuleFactory

Solution: Re-compile CSS styles with new flex sdk.

14. Replace namespace xmlns:mx="http://www.adobe.com/2006/mxml" with xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"

15. Replace mx:Script, mx:Style, mx:Array with fx:Script, fx:Style, fx:Array, etc.

16. Use the <fx:Declarations> tag to declare non-default, non-visual properties of the current class. These tags typically include effect, validator, formatter, and data service tags.

17. Add namespaces to .css files. For example, SSBaseTheme.css
@namespace s "library://ns.adobe.com/flex/spark";
@namespace  "library://ns.adobe.com/flex/mx";

18. Module didn’t inherit the styles. Add FlexGlobals.topLevelApplication.moduleFactory to the fourth parameter of load function.
moduleInfo.load(ApplicationDomain.currentDomain, null, null, FlexGlobals.topLevelApplication.moduleFactory);

19. Replace Application.application with FlexGlobals.topLevelApplication.

20. Replace Stroke with SolidColorStroke.

21. In Flex 4 we no longer call the StyleManager class as a singleton (StyleManager.getStyleManager()). Instead, StyleManager implements IStyleManager2 and you can get a reference to the styleManager directly, like this:
var styleManager:IStyleManager2 = FlexGlobals.topLevelApplication.styleManager;
So in Flex 3:
var styleSheet:CSSStyleDeclaration=StyleManager.getStyleDeclaration("DragManager");
In Flex 4:
Var styleSheet:CSSStyleDeclaration = FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("mx.managers.DragManager");
FlexGlobals.topLevelApplication.styleManager.loadStyleDeclarations

22. Replace mx.collections.SummaryField with mx.collections.SummaryField2. Change method operation to summaryOperation.
Replace mx.collections.GroupingCollection to mx.collections.GroupingCollection2.

23. Bug in flex 4.1: TypeError: Error #1009: Cannot access a property or method of a null object reference.at mx.charts::AxisRenderer/calcVerticalGutters()
A reference to "lastLabel" will be null if there is only one label.
It is solved in flex 4.5.
Workaround: set canDropLabels style of AxisRenderer to false.

24. IBM Ilog Elixir 3 compatibility issue with flex 4.5.
VerifyError: Error #1053: Illegal override of dataToLocal in ilog.charts3d.charts3dClasses.CartesianChart3D.
VerifyError: Error #1014: Class ilog.charts3d.charts3dClasses::CartesianChart3D could not be found.
VerifyError: Error #1014: Class ilog.charts3d::ColumnChart3D could not be found.

25. warning: <mx:HBox id="timeBox" x="3" y="2" horizontalGap="0" verticalAlign="center" height="100%"/>
change to
<mx:HBox id="timeBox" x="3" y="2" horizontalGap="0" verticalAlign="middle" height="100%">

26. StyleManager=mx.core.FlexGlobals.toplevelApplication.styleManager

27. The swc has style defaults and is in the library-path, which means dependencies will be linked in without the styles. 
This can cause applications, which use the output swc, to have missing skins.  The swc should be put in the external-library-path.

Solution:modify the link type of warning SDK libraries to external in the customized flex lib.

28. CSS warning:
flex-config.xml:
<namespaces>
      <!-- Specify a URI to associate with a manifest of components for use as MXML -->
      <namespace>
           <uri>http://ns.adobe.com/mxml/2009</uri>
           <manifest>mxml-2009-manifest.xml</manifest>
      </namespace>
      <namespace>
           <uri>library://ns.adobe.com/flex/spark</uri>
           <manifest>spark-manifest.xml</manifest>
      </namespace>
      <namespace>
           <uri>library://ns.adobe.com/flex/mx</uri>
           <manifest>mx-manifest.xml</manifest>
      </namespace>
      <namespace>
           <uri>http://www.adobe.com/2006/mxml</uri>
           <manifest>mxml-manifest.xml</manifest>
      </namespace>
</namespaces>
<theme>
      <!-- The Flex 4 default theme is Spark. -->
      <filename>themes/Halo/halo.swc</filename>
</theme>


29. XML处理上,Flex3和Flex4有点不同,例子
voXML : XML = <example>
<updateData>
<viewType>U</viewType>
</updateData>
</example>

voXML.appendChild('<queryData><viewType>P</viewType></queryData>');

在Flex3中,voXML内容如下:
<example>
<updateData>
<viewType>U</viewType>
</updateData>
<queryData>
<viewType>P</viewType>
</queryData>
</example>
在Flex4中, voXML内容如下:
<example>
<updateData>
<viewType>U</viewType>
</updateData>
<updateData>
&lt;queryData&gt;&lt;viewType&gt;P&lt;/viewType&gt;&lt;/queryData&gt;
</updateData>
</example>

解决方法:
1.voXML.appendChild(new XML('<queryData><viewType>P</viewType></queryData>'));
2.voXML.appendChild(<queryData><viewType>P</viewType></queryData>);
0
0
分享到:
评论

相关推荐

    flex的sdk3.6.0

    Flex SDK 3.6.0 是 Adobe 公司推出的一款用于开发富互联网应用程序(Rich Internet Applications,RIA)的开发工具包。它基于ActionScript 3.0编程语言和Flash Player运行时环境,允许开发者创建交互性强、图形丰富...

    配置Flex Builder 3.2来集成Flex 3.4 SDK

    4. **确认并保存设置**,此时Flex Builder 3.2应该能正常识别并使用Flex 3.4 SDK了。 通过以上步骤,我们成功地将Flex 3.4 SDK集成到了Flex Builder 3.2中,这不仅提升了开发效率,还使得开发者能够利用Flex 3.4 ...

    APE(flex out of memory)

    压缩包子文件的文件名列表中的"3.2"和"3.3"可能是版本号,暗示了问题可能出现在特定的Flex SDK或IDE版本中。检查和升级到最新版本可能有助于解决问题,同时查阅相关版本的发行说明和已知问题列表,看看是否有人报告...

    整合flex和spring常遇到的问题

    ### 整合Flex与Spring常遇到的问题 在实际开发过程中,将Adobe Flex与Spring框架进行集成是一项复杂的任务,尤其对于初次...通过上述步骤的细致调整和测试,可以有效地解决常见的问题,实现一个稳定高效的集成系统。

    Flex3学习指南-是初学者学习Flex必备资料1

    10. **Flex SDK和Flash Player**:Flex SDK是开发Flex应用所需的免费工具集,而Flash Player是运行Flex应用的客户端插件。尽管现在有了Adobe Animate和HTML5,但Flex在某些场景下仍然有其独特优势。 11. **Flex应用...

    Flex4 in Action

    Flex4(代号为 Hero)是 Flex 框架的一个重大升级版本,它引入了许多新的特性和改进: - **Spark 组件体系结构**:Flex4 引入了一种全新的组件体系结构,称为 Spark。Spark 组件更轻量级、更灵活,并且提供了更好的...

    flex资料箱(flex + adobe air)

    5. **Flex Cookbook**:这可能是一本关于解决Flex开发中常见问题的参考书,包含各种实用技巧和解决方案,是开发者解决问题的好帮手。 6. **Adobe AIR**:AIR允许Flex应用运行在用户的桌面,扩展了Flex的应用范围。...

    flex4 中文 教程 详细介绍flex4 的用法

    Flex SDK 是一套开发工具包,包含 Flex 框架、编译器和调试器,遵循 Mozilla Public License, version 1.1 (MPL) 开源协议。它使用 Action Script 3.0 作为开发语言,允许开发者创建可在 Adobe Flash Player 或 ...

    flex 2.0序列号

    Flex 2.0是在2006年发布的,它是Flex SDK的一个重要版本,提供了许多新功能和改进,旨在提升开发者创建富互联网应用程序的效率。Flex 2.0引入了Flex Builder作为集成开发环境(IDE),这是一个基于Eclipse的工具,为...

    MyEclipse_8.0+flex_4_plugin+Blazeds配置

    Flex 4是Adobe Flex框架的重大升级,引入了全新的Spark组件模型和Graphical Layout Engine(Gumbo),为开发者提供了更大的灵活性和更强大的视觉效果。Flex 4的Skinning和 States机制使得UI设计更为灵活,可以创建出...

    flexmdi_flex插件

    9. **集成与兼容性**:FlexMDI插件需要与Flex SDK和Flash Player或Adobe AIR运行环境兼容。开发者需要注意所使用的Flex版本和目标平台,以确保插件能正常工作。 10. **文档与示例**:学习和使用FlexMDI时,官方文档...

    MapGIS IGServer Flex 问题集锦

    程序安装过程中会自动安装Flexsdk3,Adobe公司FlexBuilder官方下载地址为:***,而Flexsdk3的下载地址为:***。 2. 创建MapGIS IGServer Flex项目 创建MapGIS IGServer Flex项目涉及到使用集成开发环境进行项目设置...

    Flex Air 拖拽排版 类似 ps 图层

    1. **ActionScript 3.0**:这是Flex应用的主要编程语言,它是AS2的升级版,提供了更高效、更面向对象的编程模型。在拖拽排版功能中,ActionScript 3.0用于处理用户交互,如监听鼠标事件(mousedown, mouseup, ...

    flex 视频聊天系统

    它使用ActionScript编程语言,并基于开放源代码的Apache Flex SDK来创建动态、交互式的Web内容。 J2EE(Java 2 Platform, Enterprise Edition)是Java平台上用于构建企业级应用的框架,它包含了一系列的规范和服务...

    Flex Book Flip Over

    Flex Book Flip Over是一款基于Adobe Flex 4.5.1 SDK开发的示例程序,它实现了书籍翻页的效果。这个程序的目的是为了展示如何在Flex应用中创建类似真实书籍的翻页体验,使得用户可以通过模拟翻页动作来浏览电子书...

    Flex企业应用开发实战源代码

    本书对Flex的基础知识着墨不多,所有内容都围绕Flex+Java这一企业级应用开发技术展开,侧重于对Flex技术原理、企业级应用的架构思想和实现方法的讲解,所以书中的内容不会随着Flex版本的升级而过时。 第1章 Flex...

    Flex-vss 环境搭建

    你可以从Adobe官方网站下载并安装Flex 3 SDK或Flex Builder 3,后者是带有集成开发环境(IDE)的版本,更便于开发。 在安装完Flex 3之后,我们需要准备Visual SourceSafe。VSS是Microsoft推出的一个源代码版本控制...

    flex教程[汇编].pdf

    它提供了一套强大的开发环境,包括Flex Builder(现已成为Flash Builder)和Flex SDK,支持开发者使用MXML和ActionScript 3.0进行界面设计和编程。这个“Flex教程[汇编].pdf”很可能涵盖了Flex的基础知识、组件使用...

    终于成功使用asdoc生成了文档

    这篇博客“终于成功使用asdoc生成了文档”可能详细记录了博主在使用asdoc过程中遇到的问题及解决方案,虽然具体的博客内容未给出,但我们可以基于asdoc的基本用法和常见问题来探讨相关知识点。 首先,asdoc是...

Global site tag (gtag.js) - Google Analytics