Delete item in list

8 replies. Last post: July 10, 2014 11:20 PM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hello Crosslight Support,

I have a problem with a Crosslight project I am currently working on. I started with the "Drawer Project Template" and did some changes. You can find the solution for download at: http://81.20.83.35:1973/Intersoft/TEA.AccountBook.zip

When you start the project on a device (simulator) you will see a list of 3 items. Doing a long click on one of the items changes the activity bar context and you will see a delete icon at the upper right corner. Clicking on the delete icon causes an error.

You find the error situation in the attached file. Before executing the "_items.Remove(entity)" code line the watch says "_items.Contains(entity) = true". Doing a remove causes the error "System.ArgumentException: jobject must not be IntPtr.Zero.Parameter name:jobject".

Adding new items works fine. Do you have any idea what the could be the problem?

Another thing which is not clear to me is in the "ItemEditActivity". Doing a click on a list item or clicking "New Entry", navigates to the "ItemEditActivity". This works fine. But when I use a fragment instead of an Activity the "New Entry" causes an error. I don't know why. It would ne nice to use a Fragment to keep the drawer navigation active, instead of using an Activity which "looses" the drawer navigation. Do you have any idea what the could be the problem?

Often there are unhandled exceptions when I do something wrong. Unfortunately, there is no usefull error message. Do you have any advice how to conclude to the underlying error?

Thanks for your support.

Thomas

1 attachment
All times are GMT -5. The time now is 12:54 PM.
Previous Next