flex 装载多个module出现: 强制转换类型失败
flex 装载多个module出现: 强制转换类型失败,出现某些类不能转换
例如:
无法将 mx.managers::PopUpManagerImpl@7155ac1 转换为 mx.managers.IPopUpManager。
解决方法是在Application加入引用
1.
import
mx.managers.DragManager;
private
var dragManager : DragManager;
2.
在ModuleLoader 的creationComplete方法中加入如下代码:
moduleLoader.applicationDomain
= ApplicationDomain.currentDomain;
在moduleloader做切换的时候,加上:
moduleLoader.unloadModule再做
moduleLoader.loadModule().
相关文档:
XML和ActionScript在创建组件方面各有优缺点:
在创建复合组件时,MXML可以时创建过程变得很容易,并且方便于对子控件进行布局。
在修改组件行为时,我们可以用ActionScript来修改他们的方法。
大多数时候,我们会使用MXML和ActionScript结合的方式来创建Flex组件和应用。
Flex提供了多种方式来结合使用MXML和ActionS ......
We're going to keep this post lean and mean, and get down to
business with 10 Tips that will keep your Flex applications fast, lean,
and responsive.
Rule # 1: Clean up after yourself
In general, it is good practice to maintain clean code. Not only
in the sense of having properly formatted and ......
文章一:http://blog.csdn.net/eyking/archive/2009/10/21/4702330.aspx
Flex就是致力于RIA的应用,Adobe为了扩大战场,推出了AIR环境,那么此时采用Flex编写的程序在浏览器中与桌面环境下都可以很好的移植了。像Flex与Flash这样奇怪的东西,战场不仅仅在浏览器上,还跑到了桌面环境下。一个很重要的安全模型就被提出了:F ......
<mx:DataGrid id="dg" click="select()" dataProvider= "{modelLocator.resultList}" borderStyle="none"
verticalGridLines="false" horizontalGridLines="false" verticalScrollPolicy="off" rowCount="10"
fontSize="16" fontStyle="normal" fontThickness="0" width="100%" height="100%">
<mx:columns& ......