Flex 中不同的命名空间是什么意思? [英] What does different namespaces mean in Flex?
问题描述
我在 6-7 个月前开发了一个 flex 应用程序.我们使用了 flex 3.5 sdk.现在我们正在使用 flex sdk 4/4.1 升级我们的 flex 应用程序
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
我还是 flex 开发的新手,我有一个与命名空间相关的非常基本的问题.
I am still new to flex development and I have a very basic question related to namespace.
我在 flex 示例应用程序中看到了三种不同的命名空间.拥有三个 diff 命名空间的目的是什么?我什么时候使用它们?
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"
谢谢
推荐答案
命名空间是一种将代码逻辑分组在一起的方法.以下是来自 Adobe 的更多相关信息.
Namespaces are a way of logically grouping code together. Here's some more on that from Adobe.
在您的特定示例中,这些是 XML 命名空间.
In your particular example, these are XML Namespaces.
列出了上面列出的特定命名空间,因为它们被您的 Flex 应用程序用于:
The particular namespaces listed above are listed as they are being used by your Flex application for:
fx - 包含顶级 ActionScript 语言元素.
fx - Contains the top-level ActionScript Language elements.
s - 包括 Flex Spark 组件
s - Include the Flex Spark components
mx - 包含 Flex mx.* 包中的所有组件、flex charting &数据可视化组件.
mx - Contains all the components in the Flex mx.* packages, flex charting & data visualization components.
有关这些特定命名空间和一般使用 XML 命名空间的更多信息:http://http://help./using/WS2db454920e96a9e51e63e3d11c0bf5f39f-7ff7.html#WS2db454920e96a9e51e63e3d11c0bf5f39f-7ff3
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屋!