Flex中不同的命名空间是什么意思? [英] What does different namespaces mean in Flex?
问题描述
我在flex示例应用程序中看到了三个不同的名称空间。有三个diff命名空间的目的是什么?什么时候使用它们?
xmlns:fx =http://ns.adobe.com/mxml/2009
xmlns:s =library://ns.adobe.com/flex/spark
xmlns:mx =library://ns.adobe.com/flex/mx
谢谢
<命名空间是将代码逻辑分组在一起的一种方式。 下面是来自Adobe的更多内容。
在您的特定示例中,这些是 XML命名空间。
$ b
上面列出的特定命名空间是在您的Flex应用程序正在使用它们时列出的:
fx - 包含顶级ActionScript语言元素。
$ b $ s包含Flex Spark组件
包含全部Flex mx。*包中的组件,flex charting&数据可视化组件。
有关这些特定命名空间和使用XML命名空间的更多信息:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf5f39f-7ff7.html#WS2db454920e96a9e51e63e3d11c0bf5f39f-7ff3
I worked on a flex application 6-7 months back. We used flex 3.5 sdk. Now we are upgrading our flex app with flex sdk 4/4.1
I am still new to flex development and I have a very basic question related to namespace.
I have seen three different namespaces in flex sample applications. What is the purpose of having three diff namespaces? When do I use each of them ?
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
Thanks
Namespaces are a way of logically grouping code together. Here's some more on that from Adobe.
In your particular example, these are XML Namespaces.
The particular namespaces listed above are listed as they are being used by your Flex application for:
fx - Contains the top-level ActionScript Language elements.
s - Include the Flex Spark components
mx - Contains all the components in the Flex mx.* packages, flex charting & data visualization components.
For more info on these particular namespaces and using XML namespaces in general: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf5f39f-7ff7.html#WS2db454920e96a9e51e63e3d11c0bf5f39f-7ff3
这篇关于Flex中不同的命名空间是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!