Skip to content

Commit

Permalink
Merge pull request #2852 from pingwang2011/timob-2729
Browse files Browse the repository at this point in the history
timob-2729: Android: runtime errors and intermittent crash when removing values from picker
  • Loading branch information
billdawson committed Aug 31, 2012
2 parents 6323dc4 + 2ea3b82 commit b61af32
Showing 1 changed file with 12 additions and 4 deletions.
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit b61af32

Please sign in to comment.