With this, we can define a method, which will then be part of the class. Add this code to the property function.
据此,我们定义一个将会成为class一部分的方法。
We then extract the name of the changed property, the new value, and pass that into a function that sets the value through reflection (see listing 7).
然后提取已变更的属性的名称和新的值,并将它们传递给一个函数,该函数通过反射对值进行设置(见清单7)。
To find all the tickets issued by officer Ree, for example, you write a map function that filters the officer property accordingly.
举例来说,要查找officerRee开出的所有罚单,您可以编写一个map函数来过滤相应的officer属性。
For the function in Listing 2, extract the data property of the event, as this is the actual data sent by the thread, and pass it to another function for updating the UI.
对于清单2中的这个函数,提取event的data属性,因为这是被线程发送的实际数据,然后将它发送给另一个函数来更新ui。
But there's a slight twist: the onclick property wants to be fed a function reference — not the string name of a function, but a reference to the function itself.
但是有点细微的地方:onclick属性需要提供函数引用——不是函数的字符串名称,而是函数本身的引用。
If a callback function is provided, this function sets the onreadystatechange property of the XHR object to that callback function.
如果提供了回调,那么这个函数将XHR对象的onreadystatechange属性设置为这个回调函数。
The Metadata property is currently not implemented, as it is not critical to the basic function of the client being implemented here.
目前尚未实现metadata属性,因为这个属性对于此处实现的客户机基本功能并不重要。
In the code, we get the account for the username (by using the getAccountForEmail function we saw earlier), then call its subscriptions property.
在代码中,获得用户名的帐户(通过使用以前看到的getaccountforemail函数),然后调用其订阅属性。
So in Listing 14, I called the emit function with my key (the user_name property) and a value.
因此在清单14中,通过我自己的键,我调用了emit函数(user_name属性)和一个值。
So you can change the event that's run on a button: you just assign a new function to the onclick property.
因此可以改变按钮触发的事件:只要赋给onclick属性一个新的函数。
A property is a data value that can be externally configured and affects the business function of the implementation.
属性是可以从外部配置的数据值,会影响此实现的业务功能。
The property callback is a function that registers the same property type information for the component properties.
属性回调是为组件属性注册相同属性类型信息的一项功能。
The other property tabs don't affect the timer function.
其他属性不会影响计时器功能。
After that, you use the special function property to turn those methods into a descriptor.
之后,使用特殊函数property将这些方法转换为一种描述符。
The easiest way is to use the Lisp function invoke, property, or field.
最为容易的方式是使用Lisp函数调用、属性或者字段。
It is significant for realizing legislative aim and the value goal of the intellectual property law, especially for exerting the function and operation thereof under the conditions of new technology.
它对于实现知识产权法的立法宗旨和价值目标,特别是发挥新技术条件下知识产权制度的功能和作用,具有重要意义。
This handler function was then assigned to the onreadystatechange property.
然后把这个事件处理函数分配给onreadystatechange属性。
The built-in Concat function supports the specification of a prefix, postfix, and delimiters through its property page.
内置的Concat函数支持通过其属性页指定前缀、后缀和分隔符。
My map function is straightforward - it simply grabs the user_name property of all documents passed to it.
我的map函数是很简单的—它只获取传递给它的所有文档的user_name属性。
Optionally, the stringify function can allow the customization of how a particular property of a complex Object is formatted.
根据需要,stringify函数可以允许定制一个复杂对象的特定属性如何被格式化。
This property ensures that a server has completed a request and typically, a callback function USES the data from the server to update a Web form or page.
这个属性确保服务器已经完成了一个请求,通常会使用一个回调函数从服务器中读出数据来更新Web表单或页面的内容。
The objects in the function object's [[scope]] property are copied into the scope chain in the same order.
首先将函数对象[[scope]]内部属性中的对象,按顺序复制到作用域链中。
This callback function is invoked several times during the life cycle of the Ajax request whose current state can be obtained from the readyState property.
此回调函数在Ajax请求的整个生命周期进行了多次调用,而请求的当前状态可从readyState属性获得。
This article discusses the XSL: version keyword, one of several available in the system-property function.
本文讨论了xsl:version关键字,这是system -property函数中可以使用的几个关键字之一。
Notice, however, that the function itself is just another property of the person object and that, without the parentheses, it would refer to an undefined value.
然而要注意的是,该函数本身也只是另一个person对象的属性,如果没有圆括号,它将引用一个未定义的值。
Because the inner function holds a reference to the outer function's variables, the scope object with property a will not be garbage collected.
由于内部函数持有到外部函数的变量的引用,所以这个带属性a的范围对象将不会被垃圾收集。
Each function object has an internal property called [[scope]] that is initialized with information about the scope in which the function was created.
每个函数对象都有一个叫做[[scope]]的内部属性,这个内部属性包含创建函数时的作用域信息。
You then pass in an anonymous function (closure) to the onEvent property.
然后将一个匿名函数(closure)传入到onevent属性。
This helper function creates the label, the input field, and the Set button for each property/action pair.
这个helper函数为每个属性/值对创建了标签、输入字段和Set按钮。
The parentheses indicate to the Rhino interpreter that I'm invoking a function rather than simply referring to a property of the object.
圆括号告诉Rhino解释器我正在调用一个函数,而不是简单地引用一个对象的属性。
应用推荐