[mono-android] change to a Java cast after 4.2.2
Jonathan Pryor
jonp at xamarin.com
Thu Jun 14 15:05:22 UTC 2012
On Jun 14, 2012, at 7:46 AM, John Murray wrote:
> I am not clear what you mean by 'what is the run time type of 'sender' ? it is spec'd as an object then cast to android .dialog thus
>
> public void garlistclick(object sender, DialogClickEventArgs ee)
> {
Before the cast...
Console.WriteLine ("sender type: {0}", sender.GetType ().FullName);
Then look at the Android Debug Log or your application output window to see what the runtime type of `sender` is.
> So instead of SetAdapter I should use SetITems ? Is that it or am I being too simplistic?
I didn't know which call you used, so I went with the easiest one of SetItems(), that's all. I'll need to try using SetAdapter() and see what happens.
Thanks,
- Jon
More information about the Monodroid
mailing list