ondrovic
Newbie
I am getting this and can't seem to find out why any thoughts or suggestions?
Here is the code where I am trying to start the activity
Here is the code that handles the id
Also the activity will start if I take out the intent.putExtra(BeerForm.INTENT_BEER_ID, String.valueOf(id));
Code:
03-04 14:04:41.565: E/AndroidRuntime(742): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ondrovic.boombozzpassport/com.ondrovic.boombozzpassport.BeerForm}: java.lang.IllegalStateException: get field slot from row 0 col -1 failed
Code:
private AdapterView.OnItemClickListener onListClick = new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View v, int pos, long id) {
Intent intent = new Intent(getApplicationContext(), BeerForm.class);
intent.putExtra(BeerForm.INTENT_BEER_ID, String.valueOf(id));
startActivity(intent);
}
};
Code:
if (beerId != null) {
beer = Beer.getById(beerId, db);
vName.setText(beer.getName());
vBrewer.setText(beer.getBrewer());
vType.setText(beer.getType());
vABV.setText(beer.getABV());
vbDesc.setText(beer.getbDesc());
vfDesc.setText(beer.getfDesc());
vRating.setRating(beer.getRating());
}
Also the activity will start if I take out the intent.putExtra(BeerForm.INTENT_BEER_ID, String.valueOf(id));
