In a unit test case, for example, the execution environment for the object is the test case itself, and the test setup code is tasked with satisfying the dependencies directly.
例如,在单元测试用例中,对象的执行环境是测试用例本身,所以测试设置代码有责任直接满足依赖项。
Instead of creating a new window and setting it up, you put the Gtk.Window class into a subclass and move all setup code into a constructor.
现在不再创建并设置新窗口,而是把Gtk . window类放进一个子类,并把所有设置代码移动到构造函数。
You will revisit the Button setup code later in this article; for now focus on the setup of the WebView control or widget.
本文稍后还会详细介绍Button设置代码,现在将重点放在WebView控件或小部件的设置上。
应用推荐