Let's use a trait to separate the callback handling from the button logic.
让我们对按钮的逻辑来使用trait,从而分离回调的处理。
The logic for the type of button and the event handler to be invoked is contained in this method, shown in Listing 15.
被调用的按钮和事件处理程序的类型的逻辑包含在此方法中,如清单 15 所示。
So the UI test automation will not catch the logic error if the application has the wrong method wired to a button click event (although every test would fail and you'd find the problem quickly).
所以如果应用程序为按钮单击事件关联了错误的方法,UI测试自动化不会捕捉到逻辑错误(虽然每次测试都会失败,而且您会很快发现问题)。
We had to duplicate that logic in ButtonObserverAnonSpec when we declared observableButton as a Button instance that mixed in the Subject trait directly.
而我们在声明observablebutton为一个按钮实例的时候,我们直接混合了Subjecttrait,它重复了ButtonObserverAnonSpec的逻辑。
HandleEvent — in the inner class, provides the logic that is invoked when pressing the command button SWT widget.
handleEvent——在inner类中,提供了当点击SWT小窗口命令按钮时调用的逻辑。
What follows is some validation logic to ensure that the user actually selected values prior to clicking the Search button.
接下来是一些验证逻辑,它们确保用户在单击Search按钮之前选择了某些值。
The initial logic behind the Search button is very similar to the first example: we check that the text box doesn't contain an empty string prior to invoking the web service.
在Search按钮背后的初始逻辑是类似于第一个实例:我们在调用 Web 服务之前,检查文本框是不是一个空字符串。
A button has an argument named onclick whose value is a Callback, a snippet of imperative application logic to be executed when the event occurs. In this particular case two things happen.
按钮拥有名为onclick的参数,它的值是Callback,当事件发生的时候,就会执行一段命令式的应用程序逻辑。
Did you know that you can transform DB2 UDB business logic into Web Services (including.net-based Web Services) by simple clicks-of-a-button in any programming model?
而且,可以在任何编程模型中通过简单的按钮点击将DB 2UDB业务逻辑转换为Web服务(包括基于.NET的Web服务)。
On the next dialog, select the Execute business logic radio button, then next.
在下个对话框中,选择Executebusinesslogic单选按钮,然后单击Next。
We would like to separate the button-specific logic from the callback logic, such that each logical component becomes simpler, more modular, and more reusable.
我们可以把按钮类的逻辑从回调逻辑中分离出来,这样每一个逻辑组件变得更加简单,更模块化,更可重用化。
Oversized button-downs and sweaters, men's hats and pants that defied all logic -- Denise was a trend trailblazer.
宽松的衣领扣衬衫和毛衣,男士帽子和西裤,看起来没有丝毫搭配逻辑——而实际上,丹尼斯是时尚先锋。
You can condense conjuring and drinking onto a single button using click-logic.
你可以轻松的制造并且喝水在1个键上靠逻辑点击。
You can condense conjuring and drinking onto a single button using click-logic.
你可以轻松的制造并且喝水在1个键上靠逻辑点击。
应用推荐