[mono-android] I'm just not getting this - why is it a null reference?

Paul F. Johnson paul at all-the-johnsons.co.uk
Sun Nov 20 18:13:33 EST 2011


Hi,

I have an EditText widget on a tab which has the value 21 in it.

I then try and retrieve the data using the following and it gives me a
null reference...

EditText editText = FindViewById<EditText>(Resource.Id.tempSurround);
if (editText.Text == "")
{
// fail
}

The attempt to get the data is called from a button on the second tab.

What is going wrong? I don't have any events set on the first tab, but
the data is there (I can flick between tabs and the data persists)

Paul
-- 
Vertraue mir, ich weiss, was ich mache...



More information about the Monodroid mailing list