Apache flex 创建完成函数时关于“令牌”的基本Qs

Apache flex 创建完成函数时关于“令牌”的基本Qs,apache-flex,Apache Flex,我注意到每次我在flex中创建一些东西和一个函数 protected function list_creationCompleteHandler(event:FlexEvent):void { getAllProductstatusResult.token = productstatusService.getAllProductstatus(); } 将出现在我的脚本中 我知道productstatusService.ge

我注意到每次我在flex中创建一些东西和一个函数

        protected function list_creationCompleteHandler(event:FlexEvent):void
        {
            getAllProductstatusResult.token = productstatusService.getAllProductstatus();
        }
将出现在我的脚本中


我知道productstatusService.getAllProductstatus;部分用于获取结果,但是getAllProductstatusResult.token部分在做什么?它的用途是什么?为什么它会链接到呼叫应答器?代币是什么意思?非常基本的问题,但困扰了我很长一段时间

您似乎向我们提供了很少的细节,但是

I know the "productstatusService.getAllProductstatus();" part is used to get the results, but what is the "getAllProductstatusResult.token" part doing? 
这称为变量赋值。因此,对象实例productstatusService上的getAllProductstatus方法调用的结果将保存到getAllProductstatusResult对象上的实例变量令牌中

and what it is used for? 
根据您提供的代码无法确定

and why it is linked to a call responer? 
根据您提供的代码,无法确定是否正在使用响应程序。假设方法调用的响应程序保存在token变量中,则必须在代码库中执行搜索,以找出使用该token的位置

and what is token means?
它是getAllProductstatusResult对象上的实例变量。实例变量可以这样创建:

public var token : Object;

或者有时可以使用get和set方法创建实例变量来表示属性。

所以您编写了这段代码,但不知道它的用途是什么?我觉得这是一种奇怪的编程方法。无论如何,试试谷歌搜索。您将获得大量信息:脚本中会发生什么?错误?或者别的什么?不,所有的代码都是由Flex生成的。我无法理解getAllProductstatusResult.token在我的代码中做了什么。请给我一些时间来理解^。^。token是一个变量,它存储从DataService检索的所有值,这就是Flex在我的脚本中生成这么多.token的原因。回答得很好。