回调表
回调表
然后构造函数打印出一条警告消息指明没有回调函数,因为列表是不可变的,所以我们没有机会用一个新的值来替代现有的回调函数列表。
It has a label and a list of callback functions that are invoked if the button is clicked.它有一个标签和一个回调函数的列表,这些函数会在按钮被点击的时候被调用。
This code also demonstrates one way to specify arguments to a callback: as an anonymous list, with a reference to the callback invoked as the first element, followed by the required parameters.此代码还举例说明了指定回调的参数的一种方法:作为一个匿名列表,具有到作为第一个 参数的回调的引用,随后是所需的参数。