From: Manolo Carrasco Date: Sun, 16 Jan 2011 10:16:01 +0000 (+0000) Subject: adding Lazy interface for Widgets plugin. Fixing a test X-Git-Tag: release-1.3.2~585 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=90a09550edf798074cae57e6e33b0b5a7a93fb69;p=gwtquery.git adding Lazy interface for Widgets plugin. Fixing a test --- diff --git a/extractLazyInterfaces.sh b/extractLazyInterfaces.sh index 25d480c4..89f13b80 100644 --- a/extractLazyInterfaces.sh +++ b/extractLazyInterfaces.sh @@ -2,4 +2,5 @@ perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java +perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Widgets.java perl extractInterface.pl --lazy --input=./gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java new file mode 100644 index 00000000..27ec1ee3 --- /dev/null +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.query.client.plugins; +import com.google.gwt.dom.client.Element; +import com.google.gwt.dom.client.NodeList; +import com.google.gwt.query.client.GQuery; +import com.google.gwt.query.client.JSArray; +import com.google.gwt.query.client.Plugin; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.TextBox; +import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.query.client.LazyBase; + +public interface LazyWidgets extends LazyBase{ + + Widget widget(); + +} diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java index e287f294..061f8277 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java @@ -303,18 +303,18 @@ public class GQueryCoreTest extends GWTTestCase { public void testIssue23() { $(e).html("
12
"); $("button").click(new Function() { - public boolean f(Event e) { - $("table > tbody > tr > td > input:checked").each(new Function() { + public boolean f(Event ev) { + done = 0; + $("table > tbody > tr > td > input:checked", e).each(new Function() { public void f(Element e) { done++; } }); + assertEquals(1, done); return true; } }); - done = 0; $("button").click(); - assertEquals(1,done); } public void testModifyMethods() {