GetValue requires an indexed object argument because properties can be indexed (for example if I was trying to get an Items property of a listbox control).
GetValue需要一个索引对象参数,因为属性可被索引(例如,当我试图获取Listbox控件的Items属性时)。
If we had added a getValue method to class Leaf, we would either have to return some sort of flag value indicating that the method application is non-sensical or actually throw an exception.
如果我们已经向Leaf类添加了getValue方法,我们要么是不得不返回一些类型的标志值表明此方法应用是无意义的,要么是实际抛出一个异常。
We have implemented the getValue function with the helper of two lower-level functions, findNode.
我们已经用两个低级函数助手findNode 和 getTextContents实现了getValue 函数。
Note that you need to cast the return type -- getValue returns an object of type Object.
注意:您需要强制转换返回类型 ―getValue返回一个Object 类型的对象。
The getValue(s) methods are simple utilities similar to the getSelection() method in Listing 7.
getValue(s)方法是类似于清单 7中的 getSelection()方法的简单实用程序。
GetValue is called by passing in both a node from which to start the search, and an XPath statement that specifies the node we're searching for.
通过传入一个开始搜索起始节点和一个指定正在搜索节点的xpath语句来调用getValue。
Finally, I use GetProperty to get information about a specified property of the control and then get the value of the control property using the GetValue method.
最后使用GetProperty获取控件的指定属性的信息,并使用GetValue方法获取控件属性值。
Finally, I use GetProperty to get information about a specified property of the control and then get the value of the control property using the GetValue method.
最后使用GetProperty获取控件的指定属性的信息,并使用GetValue方法获取控件属性值。
应用推荐