Once again, we override the click method.
再一次,我们重写了click方法。
The overridden click method increments count.
被重写的click方法会增加count。
Only the button's label field and click method remain.
只有按钮的label字段和click方法被保留了下来。
The click method iterates through the list of callbacks and invokes each one.
方法click会遍历回调函数的列表,然后一个个地调用它们。
The click method now only CARES about the visual appearance of a "physical" button being clicked.
这个click方法现在只关心一个“物理上的”按钮被单击时候的可见表现。
Since the new click method overrides Button's concrete implementation, the override keyword is required.
因为新的click方法重写了Button的具体实现,必须加上override关键字。
You can also select multiple files or folders and pass a list of files to a script with the same right-click method.
还可以选择多个文件或者文件夹,并采用相同的右击方法,将文件清单传递给脚本。
The primary constructor takes a label argument and a list of callbacks that are invoked when the button's click method is invoked.
主构造函数接受一个label(标签)参数和一个callbacks(回调)的list(列表),这些回调函数会在按钮的click方法被调用时被调用。
However, often times the click method should be called instead, since it will also be thrown as an event, and it is more in line with expected behavior and is less error prone.
然而,更多时候,却应该调用click方法,因为此方法也会作为事件抛出,而且它更符合预期的行为,更不容易出错。
However, often times the click method should be called instead, since it will also be thrown as an event, and it is more in line with expected behavior and is less error prone.
然而,更多时候,却应该调用click方法,因为此方法也会作为事件抛出,而且它更符合预期的行为,更不容易出错。
应用推荐