Flex 4中mx / fx / s对象类型有什么区别? [英] What's the difference between the mx/fx/s object types in Flex 4?

查看:142
本文介绍了Flex 4中mx / fx / s对象类型有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Flex4提供了以下命名空间:

  xmlns:fx =http://ns.adobe.com/mxml/ 2009
xmlns:s =library://ns.adobe.com/flex/spark
xmlns:mx =library://ns.adobe.com/flex/halo

有什么区别?哪个命名空间提供哪个功能?我在哪里可以找到有关的信息?

你在mxml中引用。
$ b 在Flex 4中有两种不同类型的命名空间。一种语言命名空间和一个组件命名空间。 http://ns.adobe.com/mxml/2009命名空间指定使用哪个版本的mxml语言。这包括脚本标签和绑定标签,以及像声明和私有的新标签。

上面引用的其他两个名称空间是组件名称空间。这些是构成将在应用程序中使用的UI组件的特定ActionScript类的引用。 / flex / spark组件集是新的flex 4组件,它们具有皮肤和组件实现的独立性。 / flex / halo组是Flex 3组中存在的组件。在Flex 3中,只有一种语言可用,只有一个组件设置为这样他们把这些定义一起卡在一个文件中。因此,尽管引擎盖上的技术部分没有改变,Adobe公开的方式(通过多个命名空间)已经有了。这看起来似乎比较复杂,但请记住,在执行flex工作时,您始终为mxml中的所有视图组件创建xml命名空间。所以现在你和核心框架的水平相当,这很棒。在Flex 4中,还有几种可以使用的语言和组件集合,所以不可能创建Flex 3中存在的一对一映射。



有关此主题的更多信息,请参阅关于此主题的Adobe文档: http: //opensource.adobe.com/wiki/display/flexsdk/MXML+2009



HTH,

sim

Flex4 provides the following namespaces:

xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:mx="library://ns.adobe.com/flex/halo"

What's the difference? Which namespace provide which function? Where can I find info about that?

解决方案

Namespaces allow you to specify to the compiler where to look for the files/classes that you reference in your mxml.

There are two different types of namespaces that get used in Flex 4. A language namespace and a component namespace. the http: //ns.adobe.com/mxml/2009 namespace specifies what version of the mxml language gets used. This includes things like the script tag and binding tag as well as new tags like declarations and private.

The other 2 namespaces you reference above are component namespaces. These are references to the specific ActionScript classes that make up the UI components you will use in your application. The /flex/spark component set is the new flex 4 components which have skins and component implementation seperate. The /flex/halo set are the components that exist in the flex 3 set. Be careful though the /flex/halo has been renamed /flex/mx in new nightly builds.

In Flex 3 there was only one language available and only one component set so they jammed the definitions for those together in one file. So while the technical bits under the hood have not changed, the way adobe exposes them (through multiple namespaces) has. This may seem more complicated at first, but keep in mind that in doing flex work you have always created xml namespaces for all your view components in mxml. So now you play on the same level as the core framework, which is great. Also in Flex 4 there are several languages and component sets that can be used, so it would be impossible to create that one-to-one mapping that existed in Flex 3.

For more information on this topic please refer to the Adobe docs on the subject: http://opensource.adobe.com/wiki/display/flexsdk/MXML+2009

HTH,

sim

这篇关于Flex 4中mx / fx / s对象类型有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆