[mono-android] NullException error
Paul F. Johnson
paul at all-the-johnsons.co.uk
Sat Nov 19 20:32:16 EST 2011
Hi,
My (slowly) developing Android app seems to have come a cropper with a
very unhelpful error message
Unhandled Exception:
System.NullReferenceException:
and that's it.
I have three tabs. Tab 2 has a reference to tab 1 like this
public class tabTwo : Activity
{
tabOne tab;
// etc
}
The button handler looks like this
private void(object s, EventArgs e)
{
if (tab.var1 == 0 || tab.var2 == 0 || tab.var3 == 0)
{
// toast line - you can't have any of these to be zero
return;
}
}
The exception is at the tab.var1 line.
Should the throwback be giving more information than that?
Paul
--
Vertraue mir, ich weiss, was ich mache...
More information about the Monodroid
mailing list