From 2ea3b8261e2aa7f8e1ace773694d22224ef0df0d Mon Sep 17 00:00:00 2001 From: Ping Wang Date: Wed, 29 Aug 2012 16:01:39 -0700 Subject: [PATCH] timob-2729: changed the argument type for addRow and removeRow --- .../modules/titanium/ui/PickerColumnProxy.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java index 7b6deae882b..fbc45b370ac 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/PickerColumnProxy.java @@ -144,9 +144,13 @@ private void handleRemoveRow(TiViewProxy o) } @Kroll.method - public void addRow(PickerRowProxy row) + public void addRow(Object row) { - this.add(row); + if (row instanceof PickerRowProxy) { + this.add((PickerRowProxy) row); + } else { + Log.w(TAG, "Unable to add the row. Invalid type for row."); + } } protected void addRows(Object[] rows) @@ -161,9 +165,13 @@ protected void addRows(Object[] rows) } @Kroll.method - public void removeRow(PickerRowProxy row) + public void removeRow(Object row) { - this.remove(row); + if (row instanceof PickerRowProxy) { + this.remove((PickerRowProxy) row); + } else { + Log.w(TAG, "Unable to remove the row. Invalid type for row."); + } } @Kroll.getProperty @Kroll.method